Class: Callback
A link to a worker callback attached to an execution. An execution (e.g. standalone Nexus operation) can have multiple callbacks attached, and will be differentiated by the request_id used when the callback is invoked.
Properties
componentPath
• componentPath: string[]
In most cases, the Execution is sufficient to identify the callback's source. But the callback could have been attached some child component of that execution. e.g. a workflow update. The component path describes the unique component as applicable, typically ending with a unique ID. e.g. ["Update", $workflowUpdateId ]
execution
• Optional execution: null | $Properties
Callback execution.
namespace
• namespace: string
Callback namespace.
requestId
• requestId: string
Server-generate request ID sent when the callback was dispatched.
Methods
toJSON
▸ toJSON(): Object
Converts this Callback to JSON.
Returns
Object
JSON object
create
▸ create(properties?): Callback & $Properties
Creates a new Callback instance using the specified properties.
Parameters
| Name | Type | Description |
|---|---|---|
properties? | $Properties | Properties to set |
Returns
Callback instance
▸ create(properties?): Callback
Parameters
| Name | Type |
|---|---|
properties? | $Properties |
Returns
decode
▸ decode(reader, length?): Callback & $Properties
Decodes a Callback 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
Callback
Throws
If the payload is not a reader or valid buffer
Throws
If required fields are missing
decodeDelimited
▸ decodeDelimited(reader): Callback & $Properties
Decodes a Callback message from the specified reader or buffer, length delimited.
Parameters
| Name | Type | Description |
|---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
Callback
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 Callback message. Does not implicitly temporal.api.common.v1.Link.Callback.verify|verify messages.
Parameters
| Name | Type | Description |
|---|---|---|
message | $Properties | Callback message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
encodeDelimited
▸ encodeDelimited(message, writer?): Writer
Encodes the specified Callback message, length delimited. Does not implicitly temporal.api.common.v1.Link.Callback.verify|verify messages.
Parameters
| Name | Type | Description |
|---|---|---|
message | $Properties | Callback message or plain object to encode |
writer? | Writer | Writer to encode to |
Returns
Writer
Writer
fromObject
▸ fromObject(object): Callback
Creates a Callback message from a plain object. Also converts values to their respective internal types.
Parameters
| Name | Type | Description |
|---|---|---|
object | Object | Plain object |
Returns
Callback
toObject
▸ toObject(message, options?): Object
Creates a plain object from a Callback message. Also converts values to other types if specified.
Parameters
| Name | Type | Description |
|---|---|---|
message | Callback | Callback |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object