Interface: RequestStrategyOptions
Hierarchy​
↳
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).
Inherited from​
ConnectionStrategyOptions.action
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.
Inherited from​
ConnectionStrategyOptions.blocking
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​
ConnectionStrategyOptions.logLevel
Defined in​
logPrefix​
• Optional logPrefix: string
The prefix to use for logging from this strategy.
Defaults to [${name}].
Inherited from​
ConnectionStrategyOptions.logPrefix
Defined in​
name​
• Optional name: string
Name of strategy.
Used to uniquely identify this strategy in a coordinator's collection.
Inherited from​
ConnectionStrategyOptions.name
Defined in​
on​
• on: string
The name of the event to observe.
Inherited from​
Defined in​
strategies/connection-strategy.ts:17
passHints​
• Optional passHints: boolean
Should results returned from calling action on the target source be
passed as hint data back to the source?
This can allow hints to inform the processing of subsequent actions on the
source. For instance, a beforeQuery event might invoke query on a
target, and those results could inform how the originating source performs
_query. This might allow a target source's sorting and filtering of
results to affect how the originating source processes the query.
This setting is only effective for blocking strategies, since only in
those scenarios is processing delayed.
Defined in​
strategies/request-strategy.ts:29
source​
• source: string
The name of the source to be observed.
Inherited from​
ConnectionStrategyOptions.source
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​
ConnectionStrategyOptions.sources
Defined in​
target​
• Optional target: string
The name of the source which will be acted upon.
Inherited from​
ConnectionStrategyOptions.target
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
Inherited from​
ConnectionStrategyOptions.catch
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
Inherited from​
ConnectionStrategyOptions.filter