@yantrix/automata v0.6.0 • Docs
Yantrix API / @yantrix/automata / IAgnosticDataDestination
Interface: IAgnosticDataDestination<DataPacketType, ResolveResultType, ErrorType> ​
Interface for dispatching data updates to external destinations with given rules and/or on specific events
Extends ​
TCycleIteratorInfo
Extended by ​
Type Parameters ​
• DataPacketType
The data type that is used as an incoming interface for the Destination
• ResolveResultType = void
An arbitrary type that is returned by transaction that actually delivers data
• ErrorType = Error
exception type
Properties ​
id ​
ts
readonly id: string;Stable identifier for this destination. Used by consumers (e.g. CoreLoop) to key the registry.
isActive() ​
ts
isActive: () => boolean;Check if processing is active
Returns ​
boolean
True if actively processing data
requestEmitter() ​
ts
requestEmitter: () => Generator<null | TDataDestinationOutput<DataPacketType, ResolveResultType, ErrorType>, any, any>;Returns an iterator over the data packets actually dispatched to the destination.
Returns ​
Generator<null | TDataDestinationOutput<DataPacketType, ResolveResultType, ErrorType>, any, any>
An iterator over data packets and dispatch results
send() ​
ts
send: (data) => Promise<null | ResolveResultType>;Directly send a packet to the destination
Parameters ​
• data: DataPacketType
data packet to dispatch
Returns ​
Promise<null | ResolveResultType>
Promise resolved with declared resolve type
start() ​
ts
start: () => this;Start/resume data processing
Returns ​
this
This destination instance
stop() ​
ts
stop: () => this;Stop/pause data processing
Returns ​
this
This destination instance