Class: StatsRole
Defined Under Namespace
Classes: StatsApp
Constant Summary collapse
- PORT =
9500
Constants inherited from Role
Instance Method Summary collapse
-
#initialize(manifest) ⇒ StatsRole
constructor
A new instance of StatsRole.
- #start ⇒ Object (also: #enable)
- #stop ⇒ Object (also: #disable)
Methods inherited from Role
#disable_link, #enable_link, get_role, #init_links, role, #state
Constructor Details
#initialize(manifest) ⇒ StatsRole
Returns a new instance of StatsRole.
9 10 11 12 13 |
# File 'lib/stats_role.rb', line 9 def initialize(manifest) super init_links 'db_read', @manifest['db_read'] init_links 'db_peer', @manifest['db_peer'] end |
Instance Method Details
#start ⇒ Object Also known as: enable
15 16 17 |
# File 'lib/stats_role.rb', line 15 def start start_server end |
#stop ⇒ Object Also known as: disable
19 20 21 |
# File 'lib/stats_role.rb', line 19 def stop @http_server.shutdown end |