class Cluster
A managed service for running Falcon workers with independently bound endpoints.
Definitions
def bind_endpoint
Cluster workers bind independently in their own process.
Implementation
def bind_endpoint
end
def with_listener(evaluator)
Bind and yield a listener owned by a cluster worker.
Signature
-
parameter
evaluatorEnvironment::Evaluator The environment evaluator.
-
yields
{|listener| ...} The listener owned by the worker.
-
parameter
listenerFalcon::Listener The bound listener.
-
parameter
Implementation
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