Class: Polyn::Nats::Msg
- Inherits:
-
Object
- Object
- Polyn::Nats::Msg
- Defined in:
- lib/polyn/nats/msg.rb
Overview
Wrapper around Nats::Msg so that we own it
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#header ⇒ Object
Returns the value of attribute header.
-
#reply ⇒ Object
Returns the value of attribute reply.
-
#subject ⇒ Object
Returns the value of attribute subject.
Instance Method Summary collapse
- #ack(**params) ⇒ Object
- #ack_sync(**params) ⇒ Object
- #in_progress(**params) ⇒ Object
-
#initialize(msg) ⇒ Msg
constructor
A new instance of Msg.
- #inspect ⇒ Object
- #metadata ⇒ Object
- #nak(**params) ⇒ Object
- #respond(data = "") ⇒ Object
- #respond_msg(msg) ⇒ Object
- #term(**params) ⇒ Object
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
#data ⇒ Object
Returns the value of attribute data.
12 13 14 |
# File 'lib/polyn/nats/msg.rb', line 12 def data @data end |
#header ⇒ Object
Returns the value of attribute header.
12 13 14 |
# File 'lib/polyn/nats/msg.rb', line 12 def header @header end |
#reply ⇒ Object
Returns the value of attribute reply.
12 13 14 |
# File 'lib/polyn/nats/msg.rb', line 12 def reply @reply end |
#subject ⇒ Object
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 |
#inspect ⇒ Object
66 67 68 |
# File 'lib/polyn/nats/msg.rb', line 66 def inspect @msg.inspect end |
#metadata ⇒ Object
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 |