farm-ng-core
core.event_service.EventServiceGrpc Class Reference

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
 

Detailed Description

Base class for a gRPC service.

Constructor & Destructor Documentation

◆ __init__()

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.

Member Function Documentation

◆ config()

EventServiceConfig core.event_service.EventServiceGrpc.config (   self)
Returns the service configuration.

◆ listUris()

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.

◆ logger()

logging.Logger core.event_service.EventServiceGrpc.logger (   self)
Returns the service logger.

◆ metrics()

EventServiceHealthMetrics core.event_service.EventServiceGrpc.metrics (   self)
Returns the service metrics.

◆ publish()

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.

◆ publish_health_metrics()

None core.event_service.EventServiceGrpc.publish_health_metrics (   self)
Publishes the health metrics of the service.

◆ request_reply_handler() [1/2]

Callable | None core.event_service.EventServiceGrpc.request_reply_handler (   self)
Returns the request/reply handler.

◆ request_reply_handler() [2/2]

None core.event_service.EventServiceGrpc.request_reply_handler (   self,
Callable  handler 
)
Sets the request/reply handler.

◆ requestReply()

RequestReplyReply core.event_service.EventServiceGrpc.requestReply (   self,
RequestReplyRequest  request,
grpc.aio.ServicerContext  context 
)

◆ reset()

None core.event_service.EventServiceGrpc.reset (   self)
Resets the service.

◆ serve()

None core.event_service.EventServiceGrpc.serve (   self)
Starts the service.

This method is called by the service manager.

◆ server()

grpc.aio.Server core.event_service.EventServiceGrpc.server (   self)
Returns the server instance.

◆ subscribe()

AsyncIterator[SubscribeReply] core.event_service.EventServiceGrpc.subscribe (   self,
SubscribeRequest  request,
grpc.aio.ServicerContext  context 
)
Implementation of grpc rpc subscribe

◆ uris()

dict[str, Uri] core.event_service.EventServiceGrpc.uris (   self)
Returns the URIs of the service.

Member Data Documentation

◆ int

core.event_service.EventServiceGrpc.int
static

The documentation for this class was generated from the following file: