Class: Health
Represents a Health
Hierarchy
Service
↳
Health
Constructors
constructor
• new Health(rpcImpl
, requestDelimited?
, responseDelimited?
)
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 |
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
Calls Check.
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
>
Calls Check.
Parameters
Name | Type | Description |
---|---|---|
request | IHealthCheckRequest | HealthCheckRequest message or plain object |
Returns
Promise
<HealthCheckResponse
>
Promise
emit
▸ emit(evt
, ...args
): Health
Emits an event by calling its listeners with the specified arguments.
Parameters
Name | Type | Description |
---|---|---|
evt | string | Event name |
...args | any [] | Arguments |
Returns
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?
): Health
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
Inherited from
$protobuf.rpc.Service.off
on
▸ on(evt
, fn
, ctx?
): Health
Registers an event listener.
Parameters
Name | Type | Description |
---|---|---|
evt | string | Event name |
fn | EventEmitterListener | Listener |
ctx? | any | Listener context |
Returns
this
Inherited from
$protobuf.rpc.Service.on
rpcCall
▸ rpcCall<TReq
, TRes
>(method
, requestCtor
, responseCtor
, request
, callback
): void
Calls a service method through rpc.Service#rpcImpl|rpcImpl.
Type parameters
Name | Type |
---|---|
TReq | extends Message <TReq , TReq > |
TRes | extends Message <TRes , 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
Calls Watch.
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
>
Calls Watch.
Parameters
Name | Type | Description |
---|---|---|
request | IHealthCheckRequest | HealthCheckRequest message or plain object |
Returns
Promise
<HealthCheckResponse
>
Promise
create
▸ Static
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.