Module: Agent99::HeaderManagement

Defined in:
lib/agent99/header_management.rb

Overview

lib/agent99/header_management.rb

Instance Method Summary collapse

Instance Method Details

#event_uuidObject



12
# File 'lib/agent99/header_management.rb', line 12

def event_uuid  = header[:event_uuid]

#from_uuidObject



11
# File 'lib/agent99/header_management.rb', line 11

def from_uuid   = header[:from_uuid]

#headerObject

private



9
# File 'lib/agent99/header_management.rb', line 9

def header      = @payload[:header]

#return_addressObject



16
17
18
19
20
21
22
23
24
25
# File 'lib/agent99/header_management.rb', line 16

def return_address
  return_address = payload[:header].dup

  return_address.merge(
    to_uuid:    return_address[:from_uuid],
    from_uuid:  return_address[:to_uuid],
    timestamp:  Agent99::Timestamp.new.to_i,
    type:       'response'
  )
end

#timestampObject



13
# File 'lib/agent99/header_management.rb', line 13

def timestamp   = header[:timestamp]

#to_uuidObject



10
# File 'lib/agent99/header_management.rb', line 10

def to_uuid     = header[:to_uuid]

#typeObject



14
# File 'lib/agent99/header_management.rb', line 14

def type        = header[:type]