Table of Contents

Interface IGateway

Namespace
Microsoft.AutoGen.RuntimeGateway.Grpc.Abstractions
Assembly
Microsoft.AutoGen.RuntimeGateway.Grpc.dll

Defines the gateway interface for handling RPC requests and subscriptions. Note that all of the request types are generated from the proto file.

public interface IGateway : IGrainObserver, IAddressable

Methods

GetSubscriptionsAsync(GetSubscriptionsRequest)

Gets the subscriptions asynchronously.

ValueTask<List<Subscription>> GetSubscriptionsAsync(GetSubscriptionsRequest request)

Parameters

request GetSubscriptionsRequest

The get subscriptions request.

Returns

ValueTask<List<Subscription>>

A task that represents the asynchronous operation. The task result contains the list of subscriptions.

InvokeRequestAsync(RpcRequest)

Invokes a request asynchronously.

ValueTask<RpcResponse> InvokeRequestAsync(RpcRequest request)

Parameters

request RpcRequest

The RPC request.

Returns

ValueTask<RpcResponse>

A task that represents the asynchronous operation. The task result contains the RPC response.

RegisterAgentTypeAsync(RegisterAgentTypeRequest, ServerCallContext)

Registers an agent type asynchronously.

ValueTask<RegisterAgentTypeResponse> RegisterAgentTypeAsync(RegisterAgentTypeRequest request, ServerCallContext context)

Parameters

request RegisterAgentTypeRequest

The register agent type request.

context ServerCallContext

The server call context.

Returns

ValueTask<RegisterAgentTypeResponse>

A task that represents the asynchronous operation. The task result contains the register agent type response.

SubscribeAsync(AddSubscriptionRequest)

Subscribes to a topic asynchronously.

ValueTask<AddSubscriptionResponse> SubscribeAsync(AddSubscriptionRequest request)

Parameters

request AddSubscriptionRequest

The add subscription request.

Returns

ValueTask<AddSubscriptionResponse>

A task that represents the asynchronous operation. The task result contains the add subscription response.

UnsubscribeAsync(RemoveSubscriptionRequest)

Unsubscribes from a topic asynchronously.

ValueTask<RemoveSubscriptionResponse> UnsubscribeAsync(RemoveSubscriptionRequest request)

Parameters

request RemoveSubscriptionRequest

The remove subscription request.

Returns

ValueTask<RemoveSubscriptionResponse>

A task that represents the asynchronous operation. The task result contains the remove subscription response.