Class: Polyn::Nats::Msg

Inherits:
Object
  • Object
show all
Defined in:
lib/polyn/nats/msg.rb

Overview

Wrapper around Nats::Msg so that we own it

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg) ⇒ Msg

Returns a new instance of Msg.



8
9
10
# File 'lib/polyn/nats/msg.rb', line 8

def initialize(msg)
  @msg = msg
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



12
13
14
# File 'lib/polyn/nats/msg.rb', line 12

def data
  @data
end

#headerObject

Returns the value of attribute header.



12
13
14
# File 'lib/polyn/nats/msg.rb', line 12

def header
  @header
end

#replyObject

Returns the value of attribute reply.



12
13
14
# File 'lib/polyn/nats/msg.rb', line 12

def reply
  @reply
end

#subjectObject

Returns the value of attribute subject.



12
13
14
# File 'lib/polyn/nats/msg.rb', line 12

def subject
  @subject
end

Instance Method Details

#ack(**params) ⇒ Object



34
35
36
# File 'lib/polyn/nats/msg.rb', line 34

def ack(**params)
  @msg.ack(**params)
end

#ack_sync(**params) ⇒ Object



38
39
40
# File 'lib/polyn/nats/msg.rb', line 38

def ack_sync(**params)
  @msg.ack_sync(**params)
end

#in_progress(**params) ⇒ Object



50
51
52
# File 'lib/polyn/nats/msg.rb', line 50

def in_progress(**params)
  @msg.in_progress(**params)
end

#inspectObject



66
67
68
# File 'lib/polyn/nats/msg.rb', line 66

def inspect
  @msg.inspect
end

#metadataObject



54
55
56
# File 'lib/polyn/nats/msg.rb', line 54

def 
  @msg.
end

#nak(**params) ⇒ Object



42
43
44
# File 'lib/polyn/nats/msg.rb', line 42

def nak(**params)
  @msg.nack(**params)
end

#respond(data = "") ⇒ Object



58
59
60
# File 'lib/polyn/nats/msg.rb', line 58

def respond(data = "")
  @msg.respond(data)
end

#respond_msg(msg) ⇒ Object



62
63
64
# File 'lib/polyn/nats/msg.rb', line 62

def respond_msg(msg)
  @msg.respond_msg(msg)
end

#term(**params) ⇒ Object



46
47
48
# File 'lib/polyn/nats/msg.rb', line 46

def term(**params)
  @msg.term(**params)
end