Skip to main content

Class: WorkerCommand

worker.v1.WorkerCommand

A command sent from the server to a worker.

Properties​

cancelActivity​

• Optional cancelActivity: null | $Properties

WorkerCommand cancelActivity.


type​

• Optional type: "cancelActivity"

WorkerCommand type.

Methods​

toJSON​

▸ toJSON(): Object

Converts this WorkerCommand to JSON.

Returns​

Object

JSON object


create​

▸ create(properties?): WorkerCommand & $Shape

Creates a new WorkerCommand instance using the specified properties.

Parameters​

NameTypeDescription
properties?$ShapeProperties to set

Returns​

WorkerCommand & $Shape

WorkerCommand instance

▸ create(properties?): WorkerCommand

Parameters​

NameType
properties?$Properties

Returns​

WorkerCommand


decode​

▸ decode(reader, length?): WorkerCommand & $Shape

Decodes a WorkerCommand message from the specified reader or buffer.

Parameters​

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

Returns​

WorkerCommand & $Shape

WorkerCommand

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited​

▸ decodeDelimited(reader): WorkerCommand & $Shape

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

Parameters​

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns​

WorkerCommand & $Shape

WorkerCommand

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 WorkerCommand message. Does not implicitly temporal.api.worker.v1.WorkerCommand.verify|verify messages.

Parameters​

NameTypeDescription
message$PropertiesWorkerCommand message or plain object to encode
writer?WriterWriter to encode to

Returns​

Writer

Writer


encodeDelimited​

▸ encodeDelimited(message, writer?): Writer

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

Parameters​

NameTypeDescription
message$PropertiesWorkerCommand message or plain object to encode
writer?WriterWriter to encode to

Returns​

Writer

Writer


fromObject​

▸ fromObject(object): WorkerCommand

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

Parameters​

NameTypeDescription
objectObjectPlain object

Returns​

WorkerCommand

WorkerCommand


toObject​

▸ toObject(message, options?): Object

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

Parameters​

NameTypeDescription
messageWorkerCommandWorkerCommand
options?IConversionOptionsConversion options

Returns​

Object

Plain object