Interface ISagaManager<AR, A>

Saga manager interface - Stateless process orchestrator.

It is reacting on Action Results of type AR and produces new actions A based on them.

Author

Иван Дугалић / Ivan Dugalic /

Idugalic

interface ISagaManager {
    handle: ((actionResult) => Promise<readonly A[]>);
    publish: ((a) => Promise<A>);
    publishAll: ((aList) => Promise<readonly A[]>);
    react: ((ar) => readonly A[]);
}

Type Parameters

  • AR

    Action Result of type AR

  • A

    Action of type A that are going to be published downstream

Hierarchy

Implemented by

Properties

handle: ((actionResult) => Promise<readonly A[]>)

Type declaration

    • (actionResult): Promise<readonly A[]>
    • Parameters

      • actionResult: AR

      Returns Promise<readonly A[]>

publish: ((a) => Promise<A>)

Type declaration

    • (a): Promise<A>
    • Publish action

      Parameters

      • a: A

        Action of type A

      Returns Promise<A>

      newly published Action of type A

publishAll: ((aList) => Promise<readonly A[]>)

Type declaration

    • (aList): Promise<readonly A[]>
    • Publish actions

      Parameters

      • aList: readonly A[]

        of Actions of type A

      Returns Promise<readonly A[]>

      list of newly published Actions of type A

react: ((ar) => readonly A[])

Type declaration

    • (ar): readonly A[]
    • Parameters

      • ar: AR

      Returns readonly A[]

Generated using TypeDoc