struct

Arcana::Envelope

Inherits Struct < Value < Object

A message passed between agents via the Bus.

Constructors

from_json(raw : String) : self
Source
new(from : String, to : String = "", subject : String = "", payload : JSON::Any = JSON::Any.new(nil), correlation_id : String = Random::Secure.hex(8), reply_to : String | Nil = nil, ordering : Ordering = Ordering::Auto, timestamp : Time = Time.utc)
Source

Instance methods

correlation_id
Source
correlation_id=(correlation_id : String)
Source
from
Source
from=(from : String)
Source
ordering
Source
ordering=(ordering : Ordering)
Source
payload
Source
payload=(payload : JSON::Any)
Source
reply(from : String, payload : JSON::Any, subject : String | Nil = nil) : Envelope

Create a reply to this envelope.

Source
reply_to
Source
reply_to=(reply_to : String | Nil)
Source
subject
Source
subject=(subject : String)
Source
timestamp
Source
timestamp=(timestamp : Time)
Source
to=(to : String)
Source
to_json(json : JSON::Builder) : Nil
Source