Interface IPayloadCodec
Payload codec for translating bytes to bytes.
Namespace: Temporalio
Assembly: Temporalio.dll
Syntax
public interface IPayloadCodec
Remarks
This is often useful for encryption and/or compression.
Methods
DecodeAsync(IReadOnlyCollection<Payload>)
Decode the given collection of payloads.
Declaration
Task<IEnumerable<Payload>> DecodeAsync(IReadOnlyCollection<Payload> payloads)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyCollection<Payload> | payloads | Payloads to decode. Do not mutate these. |
Returns
Type | Description |
---|---|
Task<IEnumerable<Payload>> | Decoded payloads. This must return the exact same number that was given to EncodeAsync(IReadOnlyCollection<Payload>). |
EncodeAsync(IReadOnlyCollection<Payload>)
Encode the given collection of payloads.
Declaration
Task<IEnumerable<Payload>> EncodeAsync(IReadOnlyCollection<Payload> payloads)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyCollection<Payload> | payloads | Payloads to encode. Do not mutate these. |
Returns
Type | Description |
---|---|
Task<IEnumerable<Payload>> | Encoded payloads. This must have at least one value and cannot have more than was given. |