Skip to main content

Class: Health

health.v1.Health

Represents a Health

Hierarchy

  • Service

    Health

Constructors

constructor

new Health(rpcImpl, requestDelimited?, responseDelimited?)

Constructs a new Health service.

Parameters

NameTypeDescription
rpcImplRPCImplRPC implementation
requestDelimited?booleanWhether requests are length-delimited
responseDelimited?booleanWhether 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

NameTypeDescription
requestIHealthCheckRequestHealthCheckRequest message or plain object
callbackCheckCallbackNode-style callback called with the error, if any, and HealthCheckResponse

Returns

void

check(request): Promise<HealthCheckResponse>

Calls Check.

Parameters

NameTypeDescription
requestIHealthCheckRequestHealthCheckRequest 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

NameTypeDescription
evtstringEvent name
...argsany[]Arguments

Returns

Health

this

Inherited from

$protobuf.rpc.Service.emit


end

end(endedByRPC?): Service

Ends this service and emits the end event.

Parameters

NameTypeDescription
endedByRPC?booleanWhether 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

NameTypeDescription
evt?stringEvent name. Removes all listeners if omitted.
fn?EventEmitterListenerListener to remove. Removes all listeners of evt if omitted.

Returns

Health

this

Inherited from

$protobuf.rpc.Service.off


on

on(evt, fn, ctx?): Health

Registers an event listener.

Parameters

NameTypeDescription
evtstringEvent name
fnEventEmitterListenerListener
ctx?anyListener context

Returns

Health

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

NameType
TReqextends Message<TReq, TReq>
TResextends Message<TRes, TRes>

Parameters

NameTypeDescription
methodMethod | ServiceMethod<TReq, TRes>Reflected or static method
requestCtorConstructor<TReq>Request constructor
responseCtorConstructor<TRes>Response constructor
requestTReq | Properties<TReq>Request message or plain object
callbackServiceMethodCallback<TRes>Service callback

Returns

void

Inherited from

$protobuf.rpc.Service.rpcCall


watch

watch(request, callback): void

Calls Watch.

Parameters

NameTypeDescription
requestIHealthCheckRequestHealthCheckRequest message or plain object
callbackWatchCallbackNode-style callback called with the error, if any, and HealthCheckResponse

Returns

void

watch(request): Promise<HealthCheckResponse>

Calls Watch.

Parameters

NameTypeDescription
requestIHealthCheckRequestHealthCheckRequest 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

NameTypeDescription
rpcImplRPCImplRPC implementation
requestDelimited?booleanWhether requests are length-delimited
responseDelimited?booleanWhether responses are length-delimited

Returns

Health

RPC service. Useful where requests and/or responses are streamed.