| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- # Generated by the Protocol Buffers compiler. DO NOT EDIT!
- # source: grpc_m/health/health.proto
- # plugin: grpclib.plugin.main
- import abc
- import typing
- import grpclib.const
- import grpclib.client
- if typing.TYPE_CHECKING:
- import grpclib.server
- import grpc_m.health.health_pb2
- class HealthBase(abc.ABC):
- @abc.abstractmethod
- async def Check(self, stream: 'grpclib.server.Stream[grpc_m.health.health_pb2.HealthCheckRequest, grpc_m.health.health_pb2.HealthCheckResponse]') -> None:
- pass
- @abc.abstractmethod
- async def Watch(self, stream: 'grpclib.server.Stream[grpc_m.health.health_pb2.HealthCheckRequest, grpc_m.health.health_pb2.HealthCheckResponse]') -> None:
- pass
- def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
- return {
- '/grpc.health.v1.Health/Check': grpclib.const.Handler(
- self.Check,
- grpclib.const.Cardinality.UNARY_UNARY,
- grpc_m.health.health_pb2.HealthCheckRequest,
- grpc_m.health.health_pb2.HealthCheckResponse,
- ),
- '/grpc.health.v1.Health/Watch': grpclib.const.Handler(
- self.Watch,
- grpclib.const.Cardinality.UNARY_STREAM,
- grpc_m.health.health_pb2.HealthCheckRequest,
- grpc_m.health.health_pb2.HealthCheckResponse,
- ),
- }
- class HealthStub:
- def __init__(self, channel: grpclib.client.Channel) -> None:
- self.Check = grpclib.client.UnaryUnaryMethod(
- channel,
- '/grpc.health.v1.Health/Check',
- grpc_m.health.health_pb2.HealthCheckRequest,
- grpc_m.health.health_pb2.HealthCheckResponse,
- )
- self.Watch = grpclib.client.UnaryStreamMethod(
- channel,
- '/grpc.health.v1.Health/Watch',
- grpc_m.health.health_pb2.HealthCheckRequest,
- grpc_m.health.health_pb2.HealthCheckResponse,
- )
|