Class GrpcAgentWorker
- Inheritance
-
Grpc
Agent Worker
- Implements
- Inherited Members
Constructors
GrpcAgentWorker(AgentRpcClient, IHostApplicationLifetime, IServiceProvider, IEnumerable<Tuple<string, Type>>, ILogger<GrpcAgentWorker>)
public GrpcAgentWorker(AgentRpc.AgentRpcClient client, IHostApplicationLifetime hostApplicationLifetime, IServiceProvider serviceProvider, IEnumerable<Tuple<string, Type>> configuredAgentTypes, ILogger<GrpcAgentWorker> logger)
Parameters
client
AgentRpc .AgentRpc Client hostApplicationLifetime
IHostApplication Lifetime serviceProvider
IServiceProvider configuredAgentTypes
IEnumerable<Tuple<string, Type>>logger
ILogger<GrpcAgent >Worker
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
PublishEventAsync(CloudEvent, CancellationToken)
public ValueTask PublishEventAsync(CloudEvent @event, CancellationToken cancellationToken = default)
Parameters
event
CloudEvent cancellationToken
CancellationToken
Returns
ReadAsync(AgentId, CancellationToken)
public ValueTask<AgentState> ReadAsync(AgentId agentId, CancellationToken cancellationToken = default)
Parameters
agentId
AgentId cancellationToken
CancellationToken
Returns
SendMessageAsync(Message, CancellationToken)
Parameters
message
MessagecancellationToken
CancellationToken
Returns
SendRequestAsync(Agent, RpcRequest, CancellationToken)
public ValueTask SendRequestAsync(Agent agent, RpcRequest request, CancellationToken cancellationToken = default)
Parameters
agent
Agentrequest
RpcRequest cancellationToken
CancellationToken
Returns
SendResponseAsync(RpcResponse, CancellationToken)
public ValueTask SendResponseAsync(RpcResponse response, CancellationToken cancellationToken = default)
Parameters
response
RpcResponse cancellationToken
CancellationToken
Returns
StartAsync(CancellationToken)
Triggered when the application host is ready to start the service.
Parameters
cancellationToken
CancellationToken Indicates that the start process has been aborted.
Returns
StopAsync(CancellationToken)
Triggered when the application host is performing a graceful shutdown.
Parameters
cancellationToken
CancellationToken Indicates that the shutdown process should no longer be graceful.
Returns
StoreAsync(AgentState, CancellationToken)
Parameters
value
AgentState cancellationToken
CancellationToken