Create a new instance.
Event used to emit when a service is available.
Debugger that can be used to output debug messages for the discovery.
Parent discovery that is being modified.
Event used to emit when a service is no longer available.
Event used to emit when a service has been updated.
Get if this discovery has been destroyed.
Event emitted whenever a service is detected as available.
Event called whenever this discovery is destroyed.
Event emitted when an error occurs for this discovery.
Event emitted whenever a service is detected to be unavailable.
Event emitted when a service is available and is updated.
Get all the available services.
array with all services
Merge this discovery with another instance that provides compatible
services. Services will be merged using their id
.
Destroy this discovery and its parent.
Filter the services discovered. This creates a new instance in which only services that pass the predicate function are available.
The filtered discovery is only valid as long as this discovery is not
destroyed. Calling destroy()
on this discovery will destroy the
filtered discovery.
Find the first service that match the given predicate. Will return
the service or undefined
.
Find all of the services that match the given predicate. Will return an array with all of the matching services.
Get a service based on an identifier.
instance of service or null
Handle that a service is now available.
Handle that a service is no longer available.
Handle that a service has been updated.
Log and emit an error for this discovery.
Map services returned by this discovery into another type of service.
The mapped discovery is only valid as long as this discovery is not
destroyed. Calling destroy()
on this discovery will destroy the
mapped discovery.
Release this discovery, it will no longer receive any service updates.
Remove a service that is no longer available.
previous service or null
if not registered
Set the services that should be available.
Add or update a service that has been found. This will register the service and emit suitable events. Services are identified internally using their identifier. Services will be treated as new if their id does is not currently tracked, and as updates if their id is currently tracked.
previous service or null
if not registered
Generated using TypeDoc
Abstract discovery for implementing layers, such as filtering and mapping.