ServiceMap lets you construct a set of services that depend on each other.

Kind: global class

new ServiceMap(serviceConfig)

ServiceMap constructor

Returns: Service - the constructed service

Param Type Description
serviceConfig Object Config object for specifying services in this ServiceMap. Every key of the config will become a property on your ServiceMap instance, the value should be an object with two keys: “Service” (the service class to construct) and “options” (the options pass to service constructor.)

serviceMap.extend(overrideOptions)

Create a new ServiceMap instance based on the configuration of this ServiceMap. The newly supplied overrideOptions will be merge with existing options for a specific service.

ServiceMap cache is transfered to the new instance for services with unchanged options.

Kind: instance method of ServiceMap

Param Type Description
overrideOptions Object Options object for specifying new options for existing services in this ServiceMap. Every key of the options should correspond with a service name and the value should be an options object that will be assigned to the existing options of that service to construct a new service instance.