NAME
KelpX::Symbiosis::Engine - Base class for engine implementation
SYNOPSIS
See the code of KelpX::Symbiosis::Engine::URLMap as an example.
DESCRIPTION
This is a base to be reimplemented for a specific way to run an ecosystem. An engine should be able to mount plack apps under itself and route traffic to them.
USAGE
Attributes
adapter
An instance of KelpX::Symbiosis::Adapter
.
app_runners
A cache for "run_app".
Methods
run_app
Finds, runs and caches an app to be mounted. Returns a coderef with the plackified app. No need to override this, but can be useful when mounting an app
build
Builds this engine. Run once after instantiating, passing all the Symbiosis configuration. Can be overriden, by default mounts the app to where it was configured to mount (but does not mount under /
by default).
mount
Mount a plack app under the given path. Must be overridden.
run
Run the ecosystem, but without the top-level middleware. Must be overridden.