Class: Falcon::Service::Cluster
- Defined in:
- lib/falcon/service/cluster.rb
Overview
A managed service for running Falcon workers with independently bound endpoints.
Instance Method Summary collapse
-
#bind_endpoint ⇒ Object
Cluster workers bind independently in their own process.
-
#with_listener(evaluator) ⇒ Object
Bind and yield a listener owned by a cluster worker.
Methods inherited from Server
#initialize, #make_listener, #run, #setup, #start, #stop
Constructor Details
This class inherits a constructor from Falcon::Service::Server
Instance Method Details
#bind_endpoint ⇒ Object
Cluster workers bind independently in their own process.
14 15 |
# File 'lib/falcon/service/cluster.rb', line 14 def bind_endpoint end |
#with_listener(evaluator) ⇒ Object
Bind and yield a listener owned by a cluster worker.
21 22 23 24 25 26 27 28 29 |
# File 'lib/falcon/service/cluster.rb', line 21 def with_listener(evaluator) endpoint = evaluator.endpoint bound_endpoint = endpoint.bound listener = make_listener(evaluator, endpoint, bound_endpoint) yield listener ensure bound_endpoint&.close end |