Class: Nanite::Register
Overview
packet that means an availability notification sent from actor to mapper
from is sender identity services is a list of services provided by the node status is a load of the node by default, but may be any criteria
agent may use to report it's availability, load, etc
Instance Attribute Summary collapse
-
#identity ⇒ Object
Returns the value of attribute identity.
-
#services ⇒ Object
Returns the value of attribute services.
-
#status ⇒ Object
Returns the value of attribute status.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(identity, services, status) ⇒ Register
constructor
A new instance of Register.
Methods inherited from Packet
Constructor Details
#initialize(identity, services, status) ⇒ Register
Returns a new instance of Register.
154 155 156 157 158 |
# File 'lib/nanite/packets.rb', line 154 def initialize(identity, services, status) @status = status @identity = identity @services = services end |
Instance Attribute Details
#identity ⇒ Object
Returns the value of attribute identity.
153 154 155 |
# File 'lib/nanite/packets.rb', line 153 def identity @identity end |
#services ⇒ Object
Returns the value of attribute services.
153 154 155 |
# File 'lib/nanite/packets.rb', line 153 def services @services end |
#status ⇒ Object
Returns the value of attribute status.
153 154 155 |
# File 'lib/nanite/packets.rb', line 153 def status @status end |
Class Method Details
.json_create(o) ⇒ Object
159 160 161 162 |
# File 'lib/nanite/packets.rb', line 159 def self.json_create(o) i = o['data'] new(i['identity'], i['services'], i['status']) end |