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 a copy of the current services.
Merge this discovery with another instance that provides compatible
services. Services will be merged using their id
.
Destroy this discovery. This should be called whenever the discovery is no longer needed. Destroying a discovery will ensure that no more events are triggered and that resources used by the discovery are released.
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.
true
the
service will be available in the filtered resultsFind 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 using an identifier. Will return the service or
undefined
.
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.
Generated using TypeDoc
API for discovering different services using a variety of protocols. This API provides a simple contract that a consumer can use without knowing the full details about the underlying discovery service.