Skip to main content

Class: TaskQueue

taskqueue.v1.TaskQueue

See https://docs.temporal.io/docs/concepts/task-queues/

Implements

Constructors

constructor

new TaskQueue(properties?): TaskQueue

Constructs a new TaskQueue.

Parameters

NameTypeDescription
properties?ITaskQueueProperties to set

Returns

TaskQueue

Properties

kind

kind: TaskQueueKind

Default: TASK_QUEUE_KIND_NORMAL.

Implementation of

ITaskQueue.kind


name

name: string

TaskQueue name.

Implementation of

ITaskQueue.name


normalName

normalName: string

Iff kind == TASK_QUEUE_KIND_STICKY, then this field contains the name of the normal task queue that the sticky worker is running on.

Implementation of

ITaskQueue.normalName

Methods

toJSON

toJSON(): Object

Converts this TaskQueue to JSON.

Returns

Object

JSON object


create

create(properties?): TaskQueue

Creates a new TaskQueue instance using the specified properties.

Parameters

NameTypeDescription
properties?ITaskQueueProperties to set

Returns

TaskQueue

TaskQueue instance


decode

decode(reader, length?): TaskQueue

Decodes a TaskQueue message from the specified reader or buffer.

Parameters

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

Returns

TaskQueue

TaskQueue

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): TaskQueue

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

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

TaskQueue

TaskQueue

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

Parameters

NameTypeDescription
messageITaskQueueTaskQueue message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

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

Parameters

NameTypeDescription
messageITaskQueueTaskQueue message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


fromObject

fromObject(object): TaskQueue

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

Parameters

NameTypeDescription
objectObjectPlain object

Returns

TaskQueue

TaskQueue


getTypeUrl

getTypeUrl(typeUrlPrefix?): string

Gets the default type url for TaskQueue

Parameters

NameTypeDescription
typeUrlPrefix?stringyour custom typeUrlPrefix(default "type.googleapis.com")

Returns

string

The default type url


toObject

toObject(message, options?): Object

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

Parameters

NameTypeDescription
messageTaskQueueTaskQueue
options?IConversionOptionsConversion options

Returns

Object

Plain object