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
• Optional selector: "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
• Optional workerInstanceKey: null | string
Worker instance key to which the command should be sent.
Methods
toJSON
▸ toJSON(): Object
Converts this WorkerSelector to JSON.
Returns
Object
JSON object
create
▸ create(properties?): WorkerSelector & $Shape
Creates a new WorkerSelector instance using the specified properties.
Parameters
| Name | Type | Description |
|---|---|---|
properties? | $Shape | Properties to set |
Returns
WorkerSelector instance
▸ create(properties?): WorkerSelector
Parameters
| Name | Type |
|---|---|
properties? | $Properties |
Returns
decode
▸ decode(reader, length?): WorkerSelector & $Shape
Decodes a WorkerSelector 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
WorkerSelector
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited
▸ decodeDelimited(reader): WorkerSelector & $Shape
Decodes a WorkerSelector message from the specified reader or buffer, length delimited.
Parameters
| Name | Type | Description |
|---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
WorkerSelector
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 WorkerSelector message. Does not implicitly temporal.api.common.v1.WorkerSelector.verify|verify messages.
Parameters
| Name | Type | Description |
|---|---|---|
message | $Properties | WorkerSelector message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
encodeDelimited
▸ encodeDelimited(message, writer?): Writer
Encodes the specified WorkerSelector message, length delimited. Does not implicitly temporal.api.common.v1.WorkerSelector.verify|verify messages.
Parameters
| Name | Type | Description |
|---|---|---|
message | $Properties | WorkerSelector message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
fromObject
▸ fromObject(object): WorkerSelector
Creates a WorkerSelector message from a plain object. Also converts values to their respective internal types.
Parameters
| Name | Type | Description |
|---|---|---|
object | Object | Plain object |
Returns
WorkerSelector
toObject
▸ toObject(message, options?): Object
Creates a plain object from a WorkerSelector message. Also converts values to other types if specified.
Parameters
| Name | Type | Description |
|---|---|---|
message | WorkerSelector | WorkerSelector |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object