Class: Health
Represents a Health
Hierarchy
-
Service
↳
Health
Constructors
constructor
• new Health(rpcImpl
, requestDelimited?
, responseDelimited?
): Health
Constructs a new Health service.
Parameters
Name | Type | Description |
---|---|---|
rpcImpl | RPCImpl | RPC implementation |
requestDelimited? | boolean | Whether requests are length-delimited |
responseDelimited? | boolean | Whether responses are length-delimited |
Returns
Overrides
$protobuf.rpc.Service.constructor
Properties
requestDelimited
• requestDelimited: boolean
Whether requests are length-delimited.
Inherited from
$protobuf.rpc.Service.requestDelimited
responseDelimited
• responseDelimited: boolean
Whether responses are length-delimited.
Inherited from
$protobuf.rpc.Service.responseDelimited
rpcImpl
• rpcImpl: null
| RPCImpl
RPC implementation. Becomes null
once the service is ended.
Inherited from
$protobuf.rpc.Service.rpcImpl
Methods
check
▸ check(request
, callback
): void
If the requested service is unknown, the call will fail with status NOT_FOUND.
Parameters
Name | Type | Description |
---|---|---|
request | IHealthCheckRequest | HealthCheckRequest message or plain object |
callback | CheckCallback | Node-style callback called with the error, if any, and HealthCheckResponse |
Returns
void
▸ check(request
): Promise
<HealthCheckResponse
>
If the requested service is unknown, the call will fail with status NOT_FOUND.
Parameters
Name | Type | Description |
---|---|---|
request | IHealthCheckRequest | HealthCheckRequest message or plain object |
Returns
Promise
<HealthCheckResponse
>
Promise
emit
▸ emit(evt
, ...args
): this
Emits an event by calling its listeners with the specified arguments.
Parameters
Name | Type | Description |
---|---|---|
evt | string | Event name |
...args | any [] | Arguments |
Returns
this
this
Inherited from
$protobuf.rpc.Service.emit
end
▸ end(endedByRPC?
): Service
Ends this service and emits the end
event.
Parameters
Name | Type | Description |
---|---|---|
endedByRPC? | boolean | Whether the service has been ended by the RPC implementation. |
Returns
Service
this
Inherited from
$protobuf.rpc.Service.end
off
▸ off(evt?
, fn?
): this
Removes an event listener or any matching listeners if arguments are omitted.
Parameters
Name | Type | Description |
---|---|---|
evt? | string | Event name. Removes all listeners if omitted. |
fn? | EventEmitterListener | Listener to remove. Removes all listeners of evt if omitted. |
Returns
this
this
Inherited from
$protobuf.rpc.Service.off
on
▸ on(evt
, fn
, ctx?
): this
Registers an event listener.
Parameters
Name | Type | Description |
---|---|---|
evt | string | Event name |
fn | EventEmitterListener | Listener |
ctx? | any | Listener context |
Returns
this
this
Inherited from
$protobuf.rpc.Service.on
rpcCall
▸ rpcCall<TReq
, TRes
>(method
, requestCtor
, responseCtor
, request
, callback
): void
Calls a service method through rpcImpl.
Type parameters
Name | Type |
---|---|
TReq | extends Message <TReq > |
TRes | extends Message <TRes > |
Parameters
Name | Type | Description |
---|---|---|
method | Method | ServiceMethod <TReq , TRes > | Reflected or static method |
requestCtor | Constructor <TReq > | Request constructor |
responseCtor | Constructor <TRes > | Response constructor |
request | TReq | Properties <TReq > | Request message or plain object |
callback | ServiceMethodCallback <TRes > | Service callback |
Returns
void
Inherited from
$protobuf.rpc.Service.rpcCall
watch
▸ watch(request
, callback
): void
Performs a watch for the serving status of the requested service. The server will immediately send back a message indicating the current serving status. It will then subsequently send a new message whenever the service's serving status changes.
If the requested service is unknown when the call is received, the server will send a message setting the serving status to SERVICE_UNKNOWN but will not terminate the call. If at some future point, the serving status of the service becomes known, the server will send a new message with the service's serving status.
If the call terminates with status UNIMPLEMENTED, then clients should assume this method is not supported and should not retry the call. If the call terminates with any other status (including OK), clients should retry the call with appropriate exponential backoff.
Parameters
Name | Type | Description |
---|---|---|
request | IHealthCheckRequest | HealthCheckRequest message or plain object |
callback | WatchCallback | Node-style callback called with the error, if any, and HealthCheckResponse |
Returns
void
▸ watch(request
): Promise
<HealthCheckResponse
>
Performs a watch for the serving status of the requested service. The server will immediately send back a message indicating the current serving status. It will then subsequently send a new message whenever the service's serving status changes.
If the requested service is unknown when the call is received, the server will send a message setting the serving status to SERVICE_UNKNOWN but will not terminate the call. If at some future point, the serving status of the service becomes known, the server will send a new message with the service's serving status.
If the call terminates with status UNIMPLEMENTED, then clients should assume this method is not supported and should not retry the call. If the call terminates with any other status (including OK), clients should retry the call with appropriate exponential backoff.
Parameters
Name | Type | Description |
---|---|---|
request | IHealthCheckRequest | HealthCheckRequest message or plain object |
Returns
Promise
<HealthCheckResponse
>
Promise
create
▸ create(rpcImpl
, requestDelimited?
, responseDelimited?
): Health
Creates new Health service using the specified rpc implementation.
Parameters
Name | Type | Description |
---|---|---|
rpcImpl | RPCImpl | RPC implementation |
requestDelimited? | boolean | Whether requests are length-delimited |
responseDelimited? | boolean | Whether responses are length-delimited |
Returns
RPC service. Useful where requests and/or responses are streamed.