Skip to main content

Class: WorkerHeartbeat

worker.v1.WorkerHeartbeat

Worker info message, contains information about the worker and its current state. All information is provided by the worker itself. (-- api-linter: core::0140::prepositions=disabled aip.dev/not-precedent: Removing those words make names less clear. --)

Implements

Constructors

constructor

new WorkerHeartbeat(properties?): WorkerHeartbeat

Constructs a new WorkerHeartbeat.

Parameters

NameTypeDescription
properties?IWorkerHeartbeatProperties to set

Returns

WorkerHeartbeat

Properties

activityPollerInfo

Optional activityPollerInfo: null | IWorkerPollerInfo

WorkerHeartbeat activityPollerInfo.

Implementation of

IWorkerHeartbeat.activityPollerInfo


activityTaskSlotsInfo

Optional activityTaskSlotsInfo: null | IWorkerSlotsInfo

WorkerHeartbeat activityTaskSlotsInfo.

Implementation of

IWorkerHeartbeat.activityTaskSlotsInfo


currentStickyCacheSize

currentStickyCacheSize: number

Current cache size, expressed in number of Workflow Executions.

Implementation of

IWorkerHeartbeat.currentStickyCacheSize


deploymentVersion

Optional deploymentVersion: null | IWorkerDeploymentVersion

WorkerHeartbeat deploymentVersion.

Implementation of

IWorkerHeartbeat.deploymentVersion


elapsedSinceLastHeartbeat

Optional elapsedSinceLastHeartbeat: null | IDuration

Elapsed time since the last heartbeat from the worker.

Implementation of

IWorkerHeartbeat.elapsedSinceLastHeartbeat


heartbeatTime

Optional heartbeatTime: null | ITimestamp

Timestamp of this heartbeat, coming from the worker. Worker should set it to "now". Note that this timestamp comes directly from the worker and is subject to workers' clock skew.

Implementation of

IWorkerHeartbeat.heartbeatTime


hostInfo

Optional hostInfo: null | IWorkerHostInfo

Worker host information.

Implementation of

IWorkerHeartbeat.hostInfo


localActivitySlotsInfo

Optional localActivitySlotsInfo: null | IWorkerSlotsInfo

WorkerHeartbeat localActivitySlotsInfo.

Implementation of

IWorkerHeartbeat.localActivitySlotsInfo


nexusPollerInfo

Optional nexusPollerInfo: null | IWorkerPollerInfo

WorkerHeartbeat nexusPollerInfo.

Implementation of

IWorkerHeartbeat.nexusPollerInfo


nexusTaskSlotsInfo

Optional nexusTaskSlotsInfo: null | IWorkerSlotsInfo

WorkerHeartbeat nexusTaskSlotsInfo.

Implementation of

IWorkerHeartbeat.nexusTaskSlotsInfo


plugins

plugins: IPluginInfo[]

Plugins currently in use by this SDK.

Implementation of

IWorkerHeartbeat.plugins


sdkName

sdkName: string

WorkerHeartbeat sdkName.

Implementation of

IWorkerHeartbeat.sdkName


sdkVersion

sdkVersion: string

WorkerHeartbeat sdkVersion.

Implementation of

IWorkerHeartbeat.sdkVersion


startTime

Optional startTime: null | ITimestamp

Worker start time. It can be used to determine worker uptime. (current time - start time)

Implementation of

IWorkerHeartbeat.startTime


status

status: WorkerStatus

Worker status. Defined by SDK.

Implementation of

IWorkerHeartbeat.status


taskQueue

taskQueue: string

Task queue this worker is polling for tasks.

Implementation of

IWorkerHeartbeat.taskQueue


totalStickyCacheHit

totalStickyCacheHit: number

A Workflow Task found a cached Workflow Execution to run against.

Implementation of

IWorkerHeartbeat.totalStickyCacheHit


totalStickyCacheMiss

totalStickyCacheMiss: number

A Workflow Task did not find a cached Workflow execution to run against.

Implementation of

IWorkerHeartbeat.totalStickyCacheMiss


workerIdentity

workerIdentity: string

Worker identity, set by the client, may not be unique. Usually host_name+(user group name)+process_id, but can be overwritten by the user.

Implementation of

IWorkerHeartbeat.workerIdentity


workerInstanceKey

workerInstanceKey: string

Worker identifier, should be unique for the namespace. It is distinct from worker identity, which is not necessarily namespace-unique.

Implementation of

IWorkerHeartbeat.workerInstanceKey


workflowPollerInfo

Optional workflowPollerInfo: null | IWorkerPollerInfo

WorkerHeartbeat workflowPollerInfo.

Implementation of

IWorkerHeartbeat.workflowPollerInfo


workflowStickyPollerInfo

Optional workflowStickyPollerInfo: null | IWorkerPollerInfo

WorkerHeartbeat workflowStickyPollerInfo.

Implementation of

IWorkerHeartbeat.workflowStickyPollerInfo


workflowTaskSlotsInfo

Optional workflowTaskSlotsInfo: null | IWorkerSlotsInfo

WorkerHeartbeat workflowTaskSlotsInfo.

Implementation of

IWorkerHeartbeat.workflowTaskSlotsInfo

Methods

toJSON

toJSON(): Object

Converts this WorkerHeartbeat to JSON.

Returns

Object

JSON object


create

create(properties?): WorkerHeartbeat

Creates a new WorkerHeartbeat instance using the specified properties.

Parameters

NameTypeDescription
properties?IWorkerHeartbeatProperties to set

Returns

WorkerHeartbeat

WorkerHeartbeat instance


decode

decode(reader, length?): WorkerHeartbeat

Decodes a WorkerHeartbeat message from the specified reader or buffer.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?numberMessage length if known beforehand

Returns

WorkerHeartbeat

WorkerHeartbeat

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): WorkerHeartbeat

Decodes a WorkerHeartbeat message from the specified reader or buffer, length delimited.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

WorkerHeartbeat

WorkerHeartbeat

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


encode

encode(message, writer?): Writer

Encodes the specified WorkerHeartbeat message. Does not implicitly temporal.api.worker.v1.WorkerHeartbeat.verify|verify messages.

Parameters

NameTypeDescription
messageIWorkerHeartbeatWorkerHeartbeat message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

Encodes the specified WorkerHeartbeat message, length delimited. Does not implicitly temporal.api.worker.v1.WorkerHeartbeat.verify|verify messages.

Parameters

NameTypeDescription
messageIWorkerHeartbeatWorkerHeartbeat message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


fromObject

fromObject(object): WorkerHeartbeat

Creates a WorkerHeartbeat message from a plain object. Also converts values to their respective internal types.

Parameters

NameTypeDescription
objectObjectPlain object

Returns

WorkerHeartbeat

WorkerHeartbeat


getTypeUrl

getTypeUrl(typeUrlPrefix?): string

Gets the default type url for WorkerHeartbeat

Parameters

NameTypeDescription
typeUrlPrefix?stringyour custom typeUrlPrefix(default "type.googleapis.com")

Returns

string

The default type url


toObject

toObject(message, options?): Object

Creates a plain object from a WorkerHeartbeat message. Also converts values to other types if specified.

Parameters

NameTypeDescription
messageWorkerHeartbeatWorkerHeartbeat
options?IConversionOptionsConversion options

Returns

Object

Plain object