Skip to main content

Class: ComputeScaler

compute.v1.ComputeScaler

ComputeScaler instructs the Temporal Service when to scale up or down the number of Workers that comprise a WorkerDeployment.

Implements

Constructors

constructor

new ComputeScaler(properties?): ComputeScaler

Constructs a new ComputeScaler.

Parameters

NameTypeDescription
properties?IComputeScalerProperties to set

Returns

ComputeScaler

Properties

details

Optional details: null | IPayload

Contains scaler-specific instructions and configuration. For server-implemented scalers, use the SDK's default data converter to ensure the server can understand it. For remote-implemented scalers, you might use your own data converters according to what the remote endpoints understand.

Implementation of

IComputeScaler.details


type

type: string

Type of the compute scaler. this string is implementation-specific and can be used by implementations to understand how to interpret the contents of the scaler_details field.

Implementation of

IComputeScaler.type

Methods

toJSON

toJSON(): Object

Converts this ComputeScaler to JSON.

Returns

Object

JSON object


create

create(properties?): ComputeScaler

Creates a new ComputeScaler instance using the specified properties.

Parameters

NameTypeDescription
properties?IComputeScalerProperties to set

Returns

ComputeScaler

ComputeScaler instance


decode

decode(reader, length?): ComputeScaler

Decodes a ComputeScaler message from the specified reader or buffer.

Parameters

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

Returns

ComputeScaler

ComputeScaler

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): ComputeScaler

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

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

ComputeScaler

ComputeScaler

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

Parameters

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

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

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

Parameters

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

Returns

Writer

Writer


fromObject

fromObject(object): ComputeScaler

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

Parameters

NameTypeDescription
objectObjectPlain object

Returns

ComputeScaler

ComputeScaler


getTypeUrl

getTypeUrl(typeUrlPrefix?): string

Gets the default type url for ComputeScaler

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 ComputeScaler message. Also converts values to other types if specified.

Parameters

NameTypeDescription
messageComputeScalerComputeScaler
options?IConversionOptionsConversion options

Returns

Object

Plain object