module Consumer::EventStore::Controls::PositionStream::Write

Public Class Methods

call(stream_name=nil, position: nil) click to toggle source
# File lib/consumer/event_store/controls/position_stream.rb, line 6
def self.call(stream_name=nil, position: nil)
  stream_name ||= StreamName.example(type: 'position')
  position ||= 0

  message = PositionStore::Updated.new
  message.position = position

  Messaging::EventStore::Write.(message, stream_name)

  return stream_name
end