farm-ng-core
|
Public Member Functions | |
None | __init__ (self, grpc.aio.Server server, EventServiceConfig config, logging.Logger|None logger=None) |
grpc.aio.Server | server (self) |
EventServiceConfig | config (self) |
logging.Logger | logger (self) |
EventServiceHealthMetrics | metrics (self) |
Callable|None | request_reply_handler (self) |
None | request_reply_handler (self, Callable handler) |
dict[str, Uri] | uris (self) |
None | reset (self) |
None | serve (self) |
None | publish_health_metrics (self) |
PublishResult | publish (self, str path, Message message, list[Timestamp]|None timestamps=None, bool latch=False) |
ListUrisReply | listUris (self, ListUrisRequest request, grpc.aio.ServicerContext context) |
AsyncIterator[SubscribeReply] | subscribe (self, SubscribeRequest request, grpc.aio.ServicerContext context) |
RequestReplyReply | requestReply (self, RequestReplyRequest request, grpc.aio.ServicerContext context) |
Static Public Attributes | |
int | |
Base class for a gRPC service.
None core.event_service.EventServiceGrpc.__init__ | ( | self, | |
grpc.aio.Server | server, | ||
EventServiceConfig | config, | ||
logging.Logger | None | logger = None |
||
) |
Initializes a new service. Args: server: The gRPC server instance. config: The service configuration. logger: The logger instance.
EventServiceConfig core.event_service.EventServiceGrpc.config | ( | self | ) |
Returns the service configuration.
ListUrisReply core.event_service.EventServiceGrpc.listUris | ( | self, | |
ListUrisRequest | request, | ||
grpc.aio.ServicerContext | context | ||
) |
List the URIs of the service. Args: request (service_pb2.ListUrisRequest): The request. context (grpc.aio.ServicerContext): The context. Returns: service_pb2.ListUrisReply: The reply.
logging.Logger core.event_service.EventServiceGrpc.logger | ( | self | ) |
Returns the service logger.
EventServiceHealthMetrics core.event_service.EventServiceGrpc.metrics | ( | self | ) |
Returns the service metrics.
PublishResult core.event_service.EventServiceGrpc.publish | ( | self, | |
str | path, | ||
Message | message, | ||
list[Timestamp] | None | timestamps = None , |
||
bool | latch = False |
||
) |
Publish a message to the service. Args: path (str): The path of the message. message (Message): The message. timestamps (list[Timestamp], optional): The timestamps. Defaults to None.
None core.event_service.EventServiceGrpc.publish_health_metrics | ( | self | ) |
Publishes the health metrics of the service.
Callable | None core.event_service.EventServiceGrpc.request_reply_handler | ( | self | ) |
Returns the request/reply handler.
None core.event_service.EventServiceGrpc.request_reply_handler | ( | self, | |
Callable | handler | ||
) |
Sets the request/reply handler.
RequestReplyReply core.event_service.EventServiceGrpc.requestReply | ( | self, | |
RequestReplyRequest | request, | ||
grpc.aio.ServicerContext | context | ||
) |
None core.event_service.EventServiceGrpc.reset | ( | self | ) |
Resets the service.
None core.event_service.EventServiceGrpc.serve | ( | self | ) |
Starts the service. This method is called by the service manager.
grpc.aio.Server core.event_service.EventServiceGrpc.server | ( | self | ) |
Returns the server instance.
AsyncIterator[SubscribeReply] core.event_service.EventServiceGrpc.subscribe | ( | self, | |
SubscribeRequest | request, | ||
grpc.aio.ServicerContext | context | ||
) |
Implementation of grpc rpc subscribe
dict[str, Uri] core.event_service.EventServiceGrpc.uris | ( | self | ) |
Returns the URIs of the service.
|
static |