Class: 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
Name | Type | Description |
---|---|---|
properties? | IWorkerHeartbeat | Properties to set |
Returns
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
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
sdkName
• sdkName: string
WorkerHeartbeat sdkName.
Implementation of
sdkVersion
• sdkVersion: string
WorkerHeartbeat sdkVersion.
Implementation of
startTime
• Optional
startTime: null
| ITimestamp
Worker start time. It can be used to determine worker uptime. (current time - start time)
Implementation of
status
• status: WorkerStatus
Worker status. Defined by SDK.
Implementation of
taskQueue
• taskQueue: string
Task queue this worker is polling for tasks.
Implementation of
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
Name | Type | Description |
---|---|---|
properties? | IWorkerHeartbeat | Properties to set |
Returns
WorkerHeartbeat instance
decode
▸ decode(reader
, length?
): WorkerHeartbeat
Decodes a WorkerHeartbeat message from the specified reader or buffer.
Parameters
Name | Type | Description |
---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
length? | number | Message length if known beforehand |
Returns
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
Name | Type | Description |
---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
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
Name | Type | Description |
---|---|---|
message | IWorkerHeartbeat | WorkerHeartbeat message or plain object to encode |
writer? | Writer | Writer 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
Name | Type | Description |
---|---|---|
message | IWorkerHeartbeat | WorkerHeartbeat message or plain object to encode |
writer? | Writer | Writer 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
Name | Type | Description |
---|---|---|
object | Object | Plain object |
Returns
WorkerHeartbeat
getTypeUrl
▸ getTypeUrl(typeUrlPrefix?
): string
Gets the default type url for WorkerHeartbeat
Parameters
Name | Type | Description |
---|---|---|
typeUrlPrefix? | string | your 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
Name | Type | Description |
---|---|---|
message | WorkerHeartbeat | WorkerHeartbeat |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object