FalconSourceFalconServiceCluster

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 evaluator Environment::Evaluator

The environment evaluator.

yields {|listener| ...}

The listener owned by the worker.

parameter listener Falcon::Listener

The bound listener.

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