Retrieves cache that is being used to retrieve the messages
Sets cache that is being used to retrieve the messages
The current formation discourse.
The features of the formation. This is pulled from the metadata
Gets the ID currently being processed
The current formation link. This can be used to determine what the next formation will be.
It is highly likely you will need to use redirect
as well
undefined
when the current formation is not known
The formation metadata. This can be used to determine extra information about the formation. Of particular note
are the features
.
Retrieves options to use when processing the links
Set options to use when processing the links
This is the current redirection state of the walker. This is used to ignore the link target and go straight to
this GUID. This can be used with link
to determine which formation will be walked to.
The start of the conversation tree to process
The formation tags. Can be used to determine formation metadata
Allows use with for-await-of loops
Moves to the next formation.
can be provided to override the formation to move to
Notifies the iterator to clean itself up
Throws an exception into the iterator. Cleans up the iterator and then throws the exception into the iterator context
the error given by the calling context into the iterator
A base class for a formation processor. It will call derived functions with the correctly cast types as it walks the formation tree. It can be driven externally through the formation tree as an iterator.
class MyProcessor extends Processor<string> { // implement the abstract discourse processing functions } const processor = new Processor({ cache, id: 'the-starting-guid'}); await process.next(); // Process the formation await process.next(); // Process the next formation await process.next('a-guid-to-skip-to'); // Jump to a specific formation for await (const id of process) { // Process formations until the end of time console.log(`${id}`); }