Class: 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
| Name | Type | Description |
|---|---|---|
properties? | IComputeScaler | Properties to set |
Returns
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
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
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
| Name | Type | Description |
|---|---|---|
properties? | IComputeScaler | Properties to set |
Returns
ComputeScaler instance
decode
▸ decode(reader, length?): ComputeScaler
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
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 | IComputeScaler | 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 | IComputeScaler | 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
getTypeUrl
▸ getTypeUrl(typeUrlPrefix?): string
Gets the default type url for ComputeScaler
Parameters
| Name | Type | Description |
|---|---|---|
typeUrlPrefix? | string | your 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
| Name | Type | Description |
|---|---|---|
message | ComputeScaler | ComputeScaler |
options? | IConversionOptions | Conversion options |
Returns
Object
Plain object