Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions stubs/grpcio-health-checking/grpc_health/v1/_async.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from grpc.aio import ServicerContext
from grpc_health.v1 import health_pb2, health_pb2_grpc

class HealthServicer(health_pb2_grpc.HealthServicer):
def __init__(self) -> None: ...
async def Check(
self,
request: health_pb2.HealthCheckRequest,
context: ServicerContext[health_pb2.HealthCheckRequest, health_pb2.HealthCheckResponse],
) -> health_pb2.HealthCheckResponse: ...
async def Watch(
self,
request: health_pb2.HealthCheckRequest,
context: ServicerContext[health_pb2.HealthCheckRequest, health_pb2.HealthCheckResponse],
) -> None: ...
async def set(self, service: str, status: int) -> None: ...
async def enter_graceful_shutdown(self) -> None: ...
6 changes: 4 additions & 2 deletions stubs/grpcio-health-checking/grpc_health/v1/health.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ from typing import Final, overload
from typing_extensions import Self

from grpc import ServicerContext
from grpc_health.v1 import health_pb2, health_pb2_grpc
from grpc_health.v1 import _async, health_pb2, health_pb2_grpc

aio = _async

SERVICE_NAME: Final[str]
OVERALL_HEALTH: Final[str]
Expand Down Expand Up @@ -33,5 +35,5 @@ class HealthServicer(health_pb2_grpc.HealthServicer):
self, request: health_pb2.HealthCheckRequest, context: ServicerContext, send_response_callback: Callable[..., Incomplete]
) -> None: ...

def set(self, service: str, status: health_pb2.HealthCheckResponse.ServingStatus) -> None: ...
def set(self, service: str, status: int) -> None: ...
def enter_graceful_shutdown(self) -> None: ...
18 changes: 9 additions & 9 deletions stubs/grpcio-health-checking/grpc_health/v1/health_pb2.pyi
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from _typeshed import Incomplete
from typing import ClassVar, final
from typing import ClassVar, Literal, final

from google._upb._message import Descriptor, FileDescriptor, MessageMeta
from google.protobuf import message
from google.protobuf.internal.enum_type_wrapper import EnumTypeWrapper

DESCRIPTOR: FileDescriptor

Expand All @@ -15,12 +15,12 @@ class HealthCheckRequest(message.Message, metaclass=MessageMeta):

@final
class HealthCheckResponse(message.Message, metaclass=MessageMeta):
ServingStatus: Incomplete
UNKNOWN: Incomplete
SERVING: Incomplete
NOT_SERVING: Incomplete
SERVICE_UNKNOWN: Incomplete
ServingStatus: ClassVar[EnumTypeWrapper]
UNKNOWN: ClassVar[Literal[0]]
SERVING: ClassVar[Literal[1]]
NOT_SERVING: ClassVar[Literal[2]]
SERVICE_UNKNOWN: ClassVar[Literal[3]]
STATUS_FIELD_NUMBER: ClassVar[int]
status: Incomplete
def __init__(self, status: Incomplete | str | None = ...) -> None: ...
status: int
def __init__(self, status: int | str | None = ...) -> None: ...
DESCRIPTOR: Descriptor
15 changes: 10 additions & 5 deletions stubs/grpcio-health-checking/grpc_health/v1/health_pb2_grpc.pyi
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
from typing import Final
from typing import Any, Final

import grpc
from grpc import aio
from grpc_health.v1 import health_pb2

GRPC_GENERATED_VERSION: Final[str]
GRPC_VERSION: Final[str]

class HealthStub:
def __init__(self, channel) -> None: ...
def __init__(self, channel: grpc.Channel | aio.Channel) -> None: ...

class HealthServicer:
def Check(self, request, context): ...
def Watch(self, request, context): ...
# Generated methods are overridden by both synchronous and asynchronous servicers.
def Check(self, request: health_pb2.HealthCheckRequest, context: Any) -> Any: ...
def Watch(self, request: health_pb2.HealthCheckRequest, context: Any) -> Any: ...

def add_HealthServicer_to_server(servicer, server) -> None: ...
def add_HealthServicer_to_server(servicer: HealthServicer, server: grpc.Server | aio.Server) -> None: ...

class Health:
@staticmethod
Expand Down
Loading