Class: Restate::HandlerIO

Inherits:
Struct
  • Object
show all
Defined in:
lib/restate/handler.rb

Overview

Describes the input/output serialization for a handler. Schema is accessed via the serde’s json_schema method.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(accept: 'application/json', content_type: 'application/json', input_serde: JsonSerde, output_serde: JsonSerde) ⇒ HandlerIO

Returns a new instance of HandlerIO.



11
12
13
14
# File 'lib/restate/handler.rb', line 11

def initialize(accept: 'application/json', content_type: 'application/json',
               input_serde: JsonSerde, output_serde: JsonSerde)
  super
end

Instance Attribute Details

#acceptObject

Returns the value of attribute accept

Returns:

  • (Object)

    the current value of accept



10
11
12
# File 'lib/restate/handler.rb', line 10

def accept
  @accept
end

#content_typeObject

Returns the value of attribute content_type

Returns:

  • (Object)

    the current value of content_type



10
11
12
# File 'lib/restate/handler.rb', line 10

def content_type
  @content_type
end

#input_serdeObject

Returns the value of attribute input_serde

Returns:

  • (Object)

    the current value of input_serde



10
11
12
# File 'lib/restate/handler.rb', line 10

def input_serde
  @input_serde
end

#output_serdeObject

Returns the value of attribute output_serde

Returns:

  • (Object)

    the current value of output_serde



10
11
12
# File 'lib/restate/handler.rb', line 10

def output_serde
  @output_serde
end