Class GrpcGatewayService
- Namespace
- Microsoft.AutoGen.RuntimeGateway.Grpc
- Assembly
- Microsoft.AutoGen.RuntimeGateway.Grpc.dll
Represents the gRPC service which handles communication between the agent worker and the cluster.
public sealed class GrpcGatewayService : AgentRpc.AgentRpcBase
- Inheritance
-
GrpcGatewayService
- Inherited Members
Constructors
GrpcGatewayService(GrpcGateway)
Represents the gRPC service which handles communication between the agent worker and the cluster.
public GrpcGatewayService(GrpcGateway gateway)
Parameters
gatewayGrpcGateway
Methods
AddSubscription(AddSubscriptionRequest, ServerCallContext)
Adds a subscription.
public override Task<AddSubscriptionResponse> AddSubscription(AddSubscriptionRequest request, ServerCallContext context)
Parameters
requestAddSubscriptionRequestThe add subscription request.
contextServerCallContextThe server call context.
Returns
- Task<AddSubscriptionResponse>
A task that represents the asynchronous operation. The task result contains the add subscription response.
GetSubscriptions(GetSubscriptionsRequest, ServerCallContext)
Gets the subscriptions.
public override Task<GetSubscriptionsResponse> GetSubscriptions(GetSubscriptionsRequest request, ServerCallContext context)
Parameters
requestGetSubscriptionsRequestThe get subscriptions request.
contextServerCallContextThe server call context.
Returns
- Task<GetSubscriptionsResponse>
A task that represents the asynchronous operation. The task result contains the get subscriptions response.
OpenChannel(IAsyncStreamReader<Message>, IServerStreamWriter<Message>, ServerCallContext)
Method run on first connect from a worker process.
public override Task OpenChannel(IAsyncStreamReader<Message> requestStream, IServerStreamWriter<Message> responseStream, ServerCallContext context)
Parameters
requestStreamIAsyncStreamReader<Message>The request stream.
responseStreamIServerStreamWriter<Message>The response stream.
contextServerCallContextThe server call context.
Returns
- Task
A task that represents the asynchronous operation.
OpenControlChannel(IAsyncStreamReader<ControlMessage>, IServerStreamWriter<ControlMessage>, ServerCallContext)
Open channel for the Control Channel (defined in the proto file).
public override Task OpenControlChannel(IAsyncStreamReader<ControlMessage> requestStream, IServerStreamWriter<ControlMessage> responseStream, ServerCallContext context)
Parameters
requestStreamIAsyncStreamReader<ControlMessage>The request stream.
responseStreamIServerStreamWriter<ControlMessage>The response stream.
contextServerCallContextThe server call context.
Returns
- Task
A task that represents the asynchronous operation.
RegisterAgent(RegisterAgentTypeRequest, ServerCallContext)
Registers an agent type (factory)
public override Task<RegisterAgentTypeResponse> RegisterAgent(RegisterAgentTypeRequest request, ServerCallContext context)
Parameters
requestRegisterAgentTypeRequestThe register agent type request.
contextServerCallContextThe server call context.
Returns
- Task<RegisterAgentTypeResponse>
A task that represents the asynchronous operation. The task result contains the register agent type response.
RemoveSubscription(RemoveSubscriptionRequest, ServerCallContext)
Removes a subscription.
public override Task<RemoveSubscriptionResponse> RemoveSubscription(RemoveSubscriptionRequest request, ServerCallContext context)
Parameters
requestRemoveSubscriptionRequestThe remove subscription request.
contextServerCallContextThe server call context.
Returns
- Task<RemoveSubscriptionResponse>
A task that represents the asynchronous operation. The task result contains the remove subscription response.