Module: Messaging::Controls::Metadata::Random
- Defined in:
- lib/messaging/controls/metadata.rb
Class Method Summary collapse
- .causation_message_global_position ⇒ Object
- .causation_message_identifier ⇒ Object
- .causation_message_position ⇒ Object
- .causation_message_stream_name ⇒ Object
- .correlation_stream_name ⇒ Object
- .data ⇒ Object
- .example ⇒ Object
- .global_position ⇒ Object
- .identifier ⇒ Object
- .position ⇒ Object
- .reply_stream_name ⇒ Object
- .schema_version ⇒ Object
- .stream_name ⇒ Object
- .time ⇒ Object
Class Method Details
.causation_message_global_position ⇒ Object
120 121 122 |
# File 'lib/messaging/controls/metadata.rb', line 120 def self. Controls::Random::Number.example end |
.causation_message_identifier ⇒ Object
140 141 142 |
# File 'lib/messaging/controls/metadata.rb', line 140 def self. "#{}/#{}" end |
.causation_message_position ⇒ Object
116 117 118 |
# File 'lib/messaging/controls/metadata.rb', line 116 def self. Controls::Random::Number.example end |
.causation_message_stream_name ⇒ Object
112 113 114 |
# File 'lib/messaging/controls/metadata.rb', line 112 def self. Controls::Random::Text.example end |
.correlation_stream_name ⇒ Object
124 125 126 |
# File 'lib/messaging/controls/metadata.rb', line 124 def self.correlation_stream_name Controls::Random::Text.example end |
.data ⇒ Object
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/messaging/controls/metadata.rb', line 152 def self.data { stream_name: stream_name, position: position, causation_message_stream_name: , causation_message_position: , causation_message_global_position: , correlation_stream_name: correlation_stream_name, reply_stream_name: reply_stream_name, global_position: global_position, time: time, schema_version: schema_version } end |
.example ⇒ Object
100 101 102 |
# File 'lib/messaging/controls/metadata.rb', line 100 def self.example Messaging::Message::Metadata.build(data) end |
.global_position ⇒ Object
144 145 146 |
# File 'lib/messaging/controls/metadata.rb', line 144 def self.global_position Controls::Random::Number.example end |
.identifier ⇒ Object
136 137 138 |
# File 'lib/messaging/controls/metadata.rb', line 136 def self.identifier "#{stream_name}/#{position}" end |
.position ⇒ Object
108 109 110 |
# File 'lib/messaging/controls/metadata.rb', line 108 def self.position Controls::Random::Number.example end |
.reply_stream_name ⇒ Object
128 129 130 |
# File 'lib/messaging/controls/metadata.rb', line 128 def self.reply_stream_name Controls::Random::Text.example end |
.schema_version ⇒ Object
132 133 134 |
# File 'lib/messaging/controls/metadata.rb', line 132 def self.schema_version Controls::Random::Number.example.to_s end |