ray.serve.grpc_util.RayServegRPCContext.set_code#

RayServegRPCContext.set_code(code: grpc.StatusCode)[源代码]#

设置在RPC完成时使用的状态码值。

如果方法实现希望 gRPC 运行时确定 RPC 的状态码,则不需要调用此方法。

参数:

code – 要发送给客户端的 StatusCode 对象。