Class: Coordinator
The Coordinator class manages a set of sources to which it applies a set of coordination strategies.
Constructors​
constructor​
• new Coordinator(options?
)
Parameters​
Name | Type |
---|---|
options | CoordinatorOptions |
Defined in​
Accessors​
activated​
• get
activated(): undefined
| Promise
<void
>
Returns​
undefined
| Promise
<void
>
Defined in​
sourceNames​
• get
sourceNames(): string
[]
Returns​
string
[]
Defined in​
sources​
• get
sources(): Source
<RequestOptions
, RequestOptions
, unknown
, unknown
>[]
Returns​
Source
<RequestOptions
, RequestOptions
, unknown
, unknown
>[]
Defined in​
strategies​
• get
strategies(): Strategy
[]
Returns​
Strategy
[]
Defined in​
strategyNames​
• get
strategyNames(): string
[]
Returns​
string
[]
Defined in​
Methods​
activate​
â–¸ activate(options?
): Promise
<void
>
Parameters​
Name | Type |
---|---|
options | ActivationOptions |
Returns​
Promise
<void
>
Defined in​
addSource​
â–¸ addSource(source
): void
Parameters​
Name | Type |
---|---|
source | Source <RequestOptions , RequestOptions , unknown , unknown > |
Returns​
void
Defined in​
addStrategy​
â–¸ addStrategy(strategy
): void
Parameters​
Name | Type |
---|---|
strategy | Strategy |
Returns​
void
Defined in​
deactivate​
â–¸ deactivate(): Promise
<void
>
Returns​
Promise
<void
>
Defined in​
getSource​
â–¸ getSource<T
>(name
): T
Type parameters​
Name | Type |
---|---|
T | extends Source <RequestOptions , RequestOptions , unknown , unknown , T > = Source <RequestOptions , RequestOptions , unknown , unknown > |
Parameters​
Name | Type |
---|---|
name | string |
Returns​
T
Defined in​
getStrategy​
â–¸ getStrategy<T
>(name
): T
Type parameters​
Name | Type |
---|---|
T | extends Strategy <T > = Strategy |
Parameters​
Name | Type |
---|---|
name | string |
Returns​
T
Defined in​
removeSource​
â–¸ removeSource(name
): void
Parameters​
Name | Type |
---|---|
name | string |
Returns​
void
Defined in​
removeStrategy​
â–¸ removeStrategy(name
): void
Parameters​
Name | Type |
---|---|
name | string |
Returns​
void