Class: WorkerSelector
This is used to send commands to a specific worker or a group of workers. Right now, it is used to send commands to a specific worker instance. Will be extended to be able to send command to multiple workers.
Properties
selector?
optionalselector?:"workerInstanceKey"
Options are:
- query (will be used as query to ListWorkers, same format as in ListWorkersRequest.query)
- task queue (just a shortcut. Same as query=' "TaskQueue"="my-task-queue" ')
- etc. All but 'query' are shortcuts, can be replaced with a query, but it is not convenient. string query = 5; string task_queue = 6; ...
workerInstanceKey?
optionalworkerInstanceKey?:string|null
Worker instance key to which the command should be sent.
Methods
toJSON()
toJSON():
object
Converts this WorkerSelector to JSON.
Returns
object
JSON object
create()
Call Signature
staticcreate(properties?):WorkerSelector&$Shape
Creates a new WorkerSelector instance using the specified properties.
Parameters
properties?
Properties to set
Returns
WorkerSelector & $Shape
WorkerSelector instance
Call Signature
staticcreate(properties?):WorkerSelector
Creates a new WorkerSelector instance using the specified properties.
Parameters
properties?
Properties to set
Returns
WorkerSelector
WorkerSelector instance
decode()
staticdecode(reader,length?):WorkerSelector&$Shape
Decodes a WorkerSelector message from the specified reader or buffer.
Parameters
reader
Uint8Array<ArrayBufferLike> | Reader
Reader or buffer to decode from
length?
number
Message length if known beforehand
Returns
WorkerSelector & $Shape
WorkerSelector
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited()
staticdecodeDelimited(reader):WorkerSelector&$Shape
Decodes a WorkerSelector message from the specified reader or buffer, length delimited.
Parameters
reader
Uint8Array<ArrayBufferLike> | Reader
Reader or buffer to decode from
Returns
WorkerSelector & $Shape
WorkerSelector
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
encode()
staticencode(message,writer?):Writer
Encodes the specified WorkerSelector message. Does not implicitly temporal.api.common.v1.WorkerSelector.verify|verify messages.
Parameters
message
WorkerSelector message or plain object to encode
writer?
Writer
Writer to encode to
Returns
Writer
Writer
encodeDelimited()
staticencodeDelimited(message,writer?):Writer
Encodes the specified WorkerSelector message, length delimited. Does not implicitly temporal.api.common.v1.WorkerSelector.verify|verify messages.
Parameters
message
WorkerSelector message or plain object to encode
writer?
Writer
Writer to encode to
Returns
Writer
Writer
fromObject()
staticfromObject(object):WorkerSelector
Creates a WorkerSelector message from a plain object. Also converts values to their respective internal types.
Parameters
object
{[k: string]: any; }
Plain object
Returns
WorkerSelector
WorkerSelector
toObject()
statictoObject(message,options?):object
Creates a plain object from a WorkerSelector message. Also converts values to other types if specified.
Parameters
message
WorkerSelector
WorkerSelector
options?
IConversionOptions
Conversion options
Returns
object
Plain object