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
- .local_properties ⇒ Object
- .position ⇒ Object
- .properties ⇒ Object
- .reply_stream_name ⇒ Object
- .schema_version ⇒ Object
- .stream_name ⇒ Object
- .time ⇒ Object
Class Method Details
.causation_message_global_position ⇒ Object
142 143 144 |
# File 'lib/messaging/controls/metadata.rb', line 142 def self. Controls::Random::Number.example end |
.causation_message_identifier ⇒ Object
162 163 164 |
# File 'lib/messaging/controls/metadata.rb', line 162 def self. "#{}/#{}" end |
.causation_message_position ⇒ Object
138 139 140 |
# File 'lib/messaging/controls/metadata.rb', line 138 def self. Controls::Random::Number.example end |
.causation_message_stream_name ⇒ Object
134 135 136 |
# File 'lib/messaging/controls/metadata.rb', line 134 def self. Controls::Random::Text.example end |
.correlation_stream_name ⇒ Object
146 147 148 |
# File 'lib/messaging/controls/metadata.rb', line 146 def self.correlation_stream_name Controls::Random::Text.example end |
.data ⇒ Object
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/messaging/controls/metadata.rb', line 182 def self.data { stream_name: stream_name, position: position, global_position: global_position, causation_message_stream_name: , causation_message_position: , causation_message_global_position: , correlation_stream_name: correlation_stream_name, reply_stream_name: reply_stream_name, properties: Properties::Random.example, local_properties: LocalProperties::Random.example, time: time, schema_version: schema_version } end |
.example ⇒ Object
117 118 119 120 121 122 123 124 |
# File 'lib/messaging/controls/metadata.rb', line 117 def self.example data = self.data data[:properties] = properties data[:local_properties] = local_properties Messaging::Message::Metadata.build(data) end |
.global_position ⇒ Object
166 167 168 |
# File 'lib/messaging/controls/metadata.rb', line 166 def self.global_position Controls::Random::Number.example end |
.identifier ⇒ Object
158 159 160 |
# File 'lib/messaging/controls/metadata.rb', line 158 def self.identifier "#{stream_name}/#{position}" end |
.local_properties ⇒ Object
178 179 180 |
# File 'lib/messaging/controls/metadata.rb', line 178 def self.local_properties LocalProperties::Random.example end |
.position ⇒ Object
130 131 132 |
# File 'lib/messaging/controls/metadata.rb', line 130 def self.position Controls::Random::Number.example end |
.properties ⇒ Object
174 175 176 |
# File 'lib/messaging/controls/metadata.rb', line 174 def self.properties Properties::Random.example end |
.reply_stream_name ⇒ Object
150 151 152 |
# File 'lib/messaging/controls/metadata.rb', line 150 def self.reply_stream_name Controls::Random::Text.example end |
.schema_version ⇒ Object
154 155 156 |
# File 'lib/messaging/controls/metadata.rb', line 154 def self.schema_version Controls::Random::Number.example.to_s end |