Interface: ConnectionStrategyOptions
Hierarchy​
↳
ConnectionStrategyOptions↳↳
RequestStrategyOptions
Properties​
action​
• action: string | (...args: unknown[]) => unknown
The action to perform on the target.
Can be specified as a string (e.g. pull) or a function which will be
invoked in the context of this strategy (and thus will have access to
both this.source and this.target).
Defined in​
strategies/connection-strategy.ts:31
blocking​
• Optional blocking: boolean | (...args: unknown[]) => boolean
Should resolution of action on the the target block the completion
of the source's event?
By default, blocking is false.
Defined in​
strategies/connection-strategy.ts:52
logLevel​
• Optional logLevel: LogLevel
A specific log level for this strategy.
Overrides the log level used when activating the coordinator.
Inherited from​
Defined in​
logPrefix​
• Optional logPrefix: string
The prefix to use for logging from this strategy.
Defaults to [${name}].
Inherited from​
Defined in​
name​
• Optional name: string
Name of strategy.
Used to uniquely identify this strategy in a coordinator's collection.
Inherited from​
Defined in​
on​
• on: string
The name of the event to observe.
Defined in​
strategies/connection-strategy.ts:17
source​
• source: string
The name of the source to be observed.
Defined in​
strategies/connection-strategy.ts:12
sources​
• Optional sources: string[]
The names of sources to include in this strategy. Leave undefined to include all sources registered with a coordinator.
Inherited from​
Defined in​
target​
• Optional target: string
The name of the source which will be acted upon.
Defined in​
strategies/connection-strategy.ts:22
Methods​
catch​
â–¸ Optional catch(error, ...args): void
A handler for any errors thrown as a result of performing the action.
Parameters​
| Name | Type |
|---|---|
error | Error |
...args | unknown[] |
Returns​
void
Defined in​
strategies/connection-strategy.ts:36
filter​
â–¸ Optional filter(...args): boolean
A filter function that returns true if the action should be performed.
filter will be invoked in the context of this strategy (and thus will
have access to both this.source and this.target).
Parameters​
| Name | Type |
|---|---|
...args | unknown[] |
Returns​
boolean