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.

Properties​

details​

• Optional details: null | $Properties

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.


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.

Methods​

toJSON​

▸ toJSON(): Object

Converts this ComputeScaler to JSON.

Returns​

Object

JSON object


create​

▸ create(properties?): ComputeScaler & $Properties

Creates a new ComputeScaler instance using the specified properties.

Parameters​

NameTypeDescription
properties?$PropertiesProperties to set

Returns​

ComputeScaler & $Properties

ComputeScaler instance

▸ create(properties?): ComputeScaler

Parameters​

NameType
properties?$Properties

Returns​

ComputeScaler


decode​

▸ decode(reader, length?): ComputeScaler & $Properties

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 & $Properties

ComputeScaler

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited​

▸ decodeDelimited(reader): ComputeScaler & $Properties

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

Parameters​

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns​

ComputeScaler & $Properties

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
message$PropertiesComputeScaler 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
message$PropertiesComputeScaler 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


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