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
132 133 134 |
# File 'lib/messaging/controls/metadata.rb', line 132 def self. Controls::Random::Number.example end |
.causation_message_identifier ⇒ Object
152 153 154 |
# File 'lib/messaging/controls/metadata.rb', line 152 def self. "#{}/#{}" end |
.causation_message_position ⇒ Object
128 129 130 |
# File 'lib/messaging/controls/metadata.rb', line 128 def self. Controls::Random::Number.example end |
.causation_message_stream_name ⇒ Object
124 125 126 |
# File 'lib/messaging/controls/metadata.rb', line 124 def self. Controls::Random::Text.example end |
.correlation_stream_name ⇒ Object
136 137 138 |
# File 'lib/messaging/controls/metadata.rb', line 136 def self.correlation_stream_name Controls::Random::Text.example end |
.data ⇒ Object
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/messaging/controls/metadata.rb', line 164 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
112 113 114 |
# File 'lib/messaging/controls/metadata.rb', line 112 def self.example Messaging::Message::Metadata.build(data) end |
.global_position ⇒ Object
156 157 158 |
# File 'lib/messaging/controls/metadata.rb', line 156 def self.global_position Controls::Random::Number.example end |
.identifier ⇒ Object
148 149 150 |
# File 'lib/messaging/controls/metadata.rb', line 148 def self.identifier "#{stream_name}/#{position}" end |
.position ⇒ Object
120 121 122 |
# File 'lib/messaging/controls/metadata.rb', line 120 def self.position Controls::Random::Number.example end |
.reply_stream_name ⇒ Object
140 141 142 |
# File 'lib/messaging/controls/metadata.rb', line 140 def self.reply_stream_name Controls::Random::Text.example end |
.schema_version ⇒ Object
144 145 146 |
# File 'lib/messaging/controls/metadata.rb', line 144 def self.schema_version Controls::Random::Number.example.to_s end |