Class: 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
| Name | Type | Description |
|---|---|---|
properties? | $Properties | Properties to set |
Returns
ComputeScaler instance
▸ create(properties?): ComputeScaler
Parameters
| Name | Type |
|---|---|
properties? | $Properties |
Returns
decode
▸ decode(reader, length?): ComputeScaler & $Properties
Decodes a ComputeScaler 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
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
| Name | Type | Description |
|---|---|---|
reader | Uint8Array | Reader | Reader or buffer to decode from |
Returns
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
| Name | Type | Description |
|---|---|---|
message | $Properties | ComputeScaler message or plain object to encode |
writer? | Writer | Writer 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
| Name | Type | Description |
|---|---|---|
message | $Properties | ComputeScaler message or plain object to encode |
writer? | Writer | Writer 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
| Name | Type | Description |
|---|---|---|
object | Object | Plain object |
Returns
ComputeScaler
toObject
▸ toObject(message, options?): Object
Creates a plain object from a ComputeScaler message. Also converts values to other types if specified.
Parameters
| Name | Type | Description |
|---|---|---|
message | ComputeScaler | ComputeScaler |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object