Constructor
new HealthContributorRegistry(contributorsopt)
Creates a new registry.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
contributors |
Map.<string, HealthIndicator> |
<optional> |
The initial contributors. |
Methods
(generator) Symbol.iterator() → {IterableIterator.<NamedContributor>}
Returns an iterator over the named contributors.
Returns:
The iterator.
- Type
- IterableIterator.<NamedContributor>
getContributor(name) → {HealthIndicator}
Returns a contributor by name.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The name of the contributor. |
Returns:
The contributorm or undefined
if not found.
- Type
- HealthIndicator
registerContributor(name, contributor)
Registers a contributor.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The name of the contributor. |
contributor |
HealthIndicator | The contributor. |
unregisterContributor(name)
Unregisters a contributor.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The name of the contributor. |
(static) getDefault() → {HealthContributorRegistry}
Returns the default registry.
Returns:
The default registry.
- Type
- HealthContributorRegistry