google.cloud.forseti.services.notifier.service module

Notifier gRPC service.

class GrpcNotifier(notifier_api, service_config)[source]

Bases: google.cloud.forseti.services.notifier.notifier_pb2_grpc.NotifierServicer

Notifier gRPC implementation.

HANDLE_KEY = 'handle'
Ping(request, _)[source]

Provides the capability to check for service availability.

Parameters:
  • request (PingRequest) – The ping request.
  • _ (object) – Context of the request.
Returns:

The response to the ping request.

Return type:

PingReply

Run(request, _)[source]

Run notifier.

Parameters:
  • request (RunRequest) – The run request.
  • _ (object) – Context of the request.
Yields:

Progress – The progress of the notifier.

_get_handle(context)[source]

Return the handle associated with the gRPC call.

Parameters:context (object) – Context of the request.
Returns:The model handle.
Return type:str
_run_notifier(inventory_index_id, progress_queue)[source]

Run notifier.

Parameters:
  • inventory_index_id (int64) – Inventory index id.
  • progress_queue (Queue) – Progress queue.
class GrpcNotifierFactory(config)[source]

Bases: object

Factory class for Notifier service gRPC interface

create_and_register_service(server)[source]

Create and register the Notifier service.

Parameters:server (object) – The server object.
Returns:The service object.
Return type:object