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
requestGetSubscriptionsRequestThe 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
requestRpcRequestThe 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
requestRegisterAgentTypeRequestThe register agent type request.
contextServerCallContextThe 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
requestAddSubscriptionRequestThe 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
requestRemoveSubscriptionRequestThe remove subscription request.
Returns
- ValueTask<RemoveSubscriptionResponse>
A task that represents the asynchronous operation. The task result contains the remove subscription response.