Skip to main content
function GrpcServer.add
def GrpcServer.add(service: typing.Any) -> None
Attach a service. The argument is the value returned by a <ServiceName>Service(...) constructor from one of the @bazel//proto/*.axl modules. Raises if a service for the same proto path is already attached. function GrpcServer.serve
def GrpcServer.serve() -> grpc.ServerHandle
Bind the endpoint synchronously and spawn the accept loop on the global tokio runtime. Returns a [GrpcServerHandle]. Raises immediately on bind failure (port in use, missing parent dir for unix socket, etc.). Subsequent add calls on this server raise.