Interface: PayloadCodec
common.PayloadCodec
PayloadCodec
is an optional step that happens between the wire and the PayloadConverter:
Temporal Server <--> Wire <--> PayloadCodec
<--> PayloadConverter
<--> User code
Implement this to transform an array of Payloads to/from the format sent over the wire and stored by Temporal Server. Common transformations are encryption and compression.
Methods
decode
▸ decode(payloads
): Promise
<IPayload
[]>
Decode an array of Payloads received from the wire.
Parameters
Name | Type |
---|---|
payloads | IPayload [] |
Returns
Promise
<IPayload
[]>
encode
▸ encode(payloads
): Promise
<IPayload
[]>
Encode an array of Payloads for sending over the wire.
Parameters
Name | Type | Description |
---|---|---|
payloads | IPayload [] | May have length 0. |
Returns
Promise
<IPayload
[]>