Module: Kobako::Transport
- Defined in:
- lib/kobako/transport.rb,
lib/kobako/transport/run.rb,
lib/kobako/transport/error.rb,
lib/kobako/transport/yield.rb,
lib/kobako/transport/request.rb,
lib/kobako/transport/yielder.rb,
lib/kobako/transport/response.rb,
lib/kobako/transport/dispatcher.rb
Overview
See lib/kobako/transport.rb for the umbrella module doc; this file owns the pure-function dispatcher that decodes guest-initiated Requests and produces encoded Responses.
Defined Under Namespace
Modules: Dispatcher Classes: Error, Request, Response, Run, Yield, Yielder
Constant Summary collapse
- TAG_OK =
First byte of the YieldResponse for the success branch — body is the block’s return value encoded as a single msgpack value.
0x01- TAG_BREAK =
First byte for ‘break val` — body is the break value.
0x02- TAG_RESERVED =
Reserved for future ‘return val` support; both sides reject this tag as a wire violation (YieldResponse envelope contract).
0x03- TAG_ERROR =
First byte for an error / fault outcome — body is a {“class”, “message”, “backtrace”} Hash.
0x04- LIVE_TAGS =
Tags both sides currently accept on the wire.
[TAG_OK, TAG_BREAK, TAG_ERROR].freeze
- STATUS_OK =
Response variant marker for the success branch.
0- STATUS_ERROR =
Response variant marker for the fault branch.
1