Skip to main content
Version: 0.17

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​

NameType
optionsCoordinatorOptions

Defined in​

coordinator.ts:36

Accessors​

activated​

• get activated(): undefined | Promise<void>

Returns​

undefined | Promise<void>

Defined in​

coordinator.ts:141


sourceNames​

• get sourceNames(): string[]

Returns​

string[]

Defined in​

coordinator.ts:95


sources​

• get sources(): Source<RequestOptions, RequestOptions, unknown, unknown>[]

Returns​

Source<RequestOptions, RequestOptions, unknown, unknown>[]

Defined in​

coordinator.ts:91


strategies​

• get strategies(): Strategy[]

Returns​

Strategy[]

Defined in​

coordinator.ts:133


strategyNames​

• get strategyNames(): string[]

Returns​

string[]

Defined in​

coordinator.ts:137

Methods​

activate​

â–¸ activate(options?): Promise<void>

Parameters​

NameType
optionsActivationOptions

Returns​

Promise<void>

Defined in​

coordinator.ts:145


addSource​

â–¸ addSource(source): void

Parameters​

NameType
sourceSource<RequestOptions, RequestOptions, unknown, unknown>

Returns​

void

Defined in​

coordinator.ts:55


addStrategy​

â–¸ addStrategy(strategy): void

Parameters​

NameType
strategyStrategy

Returns​

void

Defined in​

coordinator.ts:99


deactivate​

â–¸ deactivate(): Promise<void>

Returns​

Promise<void>

Defined in​

coordinator.ts:152


getSource​

â–¸ getSource<T>(name): T

Type parameters​

NameType
Textends Source<RequestOptions, RequestOptions, unknown, unknown, T> = Source<RequestOptions, RequestOptions, unknown, unknown>

Parameters​

NameType
namestring

Returns​

T

Defined in​

coordinator.ts:87


getStrategy​

â–¸ getStrategy<T>(name): T

Type parameters​

NameType
Textends Strategy<T> = Strategy

Parameters​

NameType
namestring

Returns​

T

Defined in​

coordinator.ts:129


removeSource​

â–¸ removeSource(name): void

Parameters​

NameType
namestring

Returns​

void

Defined in​

coordinator.ts:72


removeStrategy​

â–¸ removeStrategy(name): void

Parameters​

NameType
namestring

Returns​

void

Defined in​

coordinator.ts:114