Service. RunnerRouter

new RunnerRouter(defaultRunner)

A multi-domain drop in replacement for anywhere we use origin-router.Router. By creating multiple dataparty ServiceRunners you can manage multiple parties and multiple services and merge them into either a single combined service. Or host them as multiple seperate domains. Essentially, this allows the ServiceHost to be multi-tenant.

Parameters:
NameTypeDescription
defaultRunnermodule:Service.ServiceRunner

The default runner to use if no others match. Required

Methods

(static) addRunner()

Parameters:
NameTypeDescription
options.domainstring
options.runnermodule:Service.ServiceRunner

(static) getRunnerByDomain(domain) → {module:Service.ServiceRunner}

Parameters:
NameTypeDescription
domainstring

(static) getRunnerByHostIdentity(identity) → {module:Service.ServiceRunner}

Parameters:
NameTypeDescription
identitydataparty_crypto.Identity

(async, static) start()

Returns: