Table of Contents

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

gateway GrpcGateway

Methods

AddSubscription(AddSubscriptionRequest, ServerCallContext)

Adds a subscription.

public override Task<AddSubscriptionResponse> AddSubscription(AddSubscriptionRequest request, ServerCallContext context)

Parameters

request AddSubscriptionRequest

The add subscription request.

context ServerCallContext

The 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

request GetSubscriptionsRequest

The get subscriptions request.

context ServerCallContext

The 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

requestStream IAsyncStreamReader<Message>

The request stream.

responseStream IServerStreamWriter<Message>

The response stream.

context ServerCallContext

The 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

requestStream IAsyncStreamReader<ControlMessage>

The request stream.

responseStream IServerStreamWriter<ControlMessage>

The response stream.

context ServerCallContext

The 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

request RegisterAgentTypeRequest

The register agent type request.

context ServerCallContext

The 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

request RemoveSubscriptionRequest

The remove subscription request.

context ServerCallContext

The server call context.

Returns

Task<RemoveSubscriptionResponse>

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