Class: Temporalio::Converters::PayloadCodec

Inherits:
Object
  • Object
show all
Defined in:
lib/temporalio/converters/payload_codec.rb

Overview

Base class for encoding and decoding payloads. Commonly used for encryption.

Instance Method Summary collapse

Instance Method Details

#decode(payloads) ⇒ Array<Api::Common::V1::Payload>

Decode the given payloads into a new set of payloads.

Parameters:

Returns:

  • (Array<Api::Common::V1::Payload>)

    Decoded payloads. Note, this does not have to be the same number as payloads given, but it must be at least one and cannot be more than was given.

Raises:

  • (NotImplementedError)


21
22
23
# File 'lib/temporalio/converters/payload_codec.rb', line 21

def decode(payloads)
  raise NotImplementedError
end

#encode(payloads) ⇒ Array<Api::Common::V1::Payload>

Encode the given payloads into a new set of payloads.

Parameters:

Returns:

  • (Array<Api::Common::V1::Payload>)

    Encoded payloads. Note, this does not have to be the same number as payloads given, but it must be at least one and cannot be more than was given.

Raises:

  • (NotImplementedError)


12
13
14
# File 'lib/temporalio/converters/payload_codec.rb', line 12

def encode(payloads)
  raise NotImplementedError
end