ni_measurementlink_service.grpc.loggers
gRPC logging interceptors.
Module Contents
Classes
Intercepts gRPC client calls and logs them for debugging. |
|
Intercepts gRPC server calls and logs them for debugging. |
- class ni_measurementlink_service.grpc.loggers.ClientLogger[source]
Bases:
grpc.UnaryUnaryClientInterceptor,grpc.UnaryStreamClientInterceptor,grpc.StreamUnaryClientInterceptor,grpc.StreamStreamClientInterceptorIntercepts gRPC client calls and logs them for debugging.
- classmethod is_enabled()[source]
Indicates whether gRPC client call logging is enabled for the current log level.
- Return type:
- intercept_unary_unary(continuation, client_call_details, request)[source]
Intercept and log a unary call.
- Parameters:
continuation (Callable[[grpc.ClientCallDetails, grpc.TRequest], grpc.CallFuture[grpc.TResponse]]) –
client_call_details (grpc.ClientCallDetails) –
request (grpc.TRequest) –
- Return type:
grpc.CallFuture[grpc.TResponse]
- intercept_unary_stream(continuation, client_call_details, request)[source]
Intercept and log a server-streaming call.
- Parameters:
continuation (Callable[[grpc.ClientCallDetails, grpc.TRequest], grpc.CallIterator[grpc.TResponse]]) –
client_call_details (grpc.ClientCallDetails) –
request (grpc.TRequest) –
- Return type:
grpc.CallIterator[grpc.TResponse]
- intercept_stream_unary(continuation, client_call_details, request_iterator)[source]
Intercept and log a client-streaming call.
- Parameters:
continuation (Callable[[grpc.ClientCallDetails, Iterator[grpc.TRequest]], grpc.CallFuture[grpc.TResponse]]) –
client_call_details (grpc.ClientCallDetails) –
request_iterator (Iterator[grpc.TRequest]) –
- Return type:
grpc.CallFuture[grpc.TResponse]
- intercept_stream_stream(continuation, client_call_details, request_iterator)[source]
Intercept and log a bidirectional streaming call.
- Parameters:
continuation (Callable[[grpc.ClientCallDetails, Iterator[grpc.TRequest]], grpc.CallIterator[grpc.TResponse]]) –
client_call_details (grpc.ClientCallDetails) –
request_iterator (Iterator[grpc.TRequest]) –
- Return type:
grpc.CallIterator[grpc.TResponse]
- class ni_measurementlink_service.grpc.loggers.ServerLogger[source]
Bases:
grpc.ServerInterceptorIntercepts gRPC server calls and logs them for debugging.
- classmethod is_enabled()[source]
Indicates whether gRPC client call logging is enabled for the current log level.
- Return type:
- intercept_service(continuation, handler_call_details)[source]
Intercept and log a server call.
- Parameters:
continuation (Callable[[grpc.HandlerCallDetails], grpc.RpcMethodHandler[grpc.TRequest, grpc.TResponse] | None]) –
handler_call_details (grpc.HandlerCallDetails) –
- Return type:
grpc.RpcMethodHandler[grpc.TRequest, grpc.TResponse]