Class OrchestrationRouter

Hierarchy

  • default
    • OrchestrationRouter

Constructors

Properties

handlerMap: Record<string, default<string, string>>
params: ICloudEventRouter

Methods

  • Processes an array of CloudEvents using registered CloudEventHandlers.

    Parameters

    • events: CloudEvent<Record<string, any>>[]

      An array of CloudEvents to be processed.

    • Optional options: CloudEventRouterHandlerOptions

    Returns Promise<OrchestrationProcessResponse[]>

    A Promise resolving to an array of processed CloudEvents.

  • Create the Async API spec 3.0.0 docs for this router

    Parameters

    • Optional params: {
          bindings?: object;
          servers?: object;
      }
      • Optional bindings?: object
      • Optional servers?: object

    Returns {
        asyncapi: string;
        channels: any;
        defaultContentType: string;
        info: {
            description: undefined | string;
            title: string;
            version: string;
        };
        operations: any;
        servers: undefined | object;
    }

    JSON of the Async API docs

    • asyncapi: string
    • channels: any
    • defaultContentType: string
    • info: {
          description: undefined | string;
          title: string;
          version: string;
      }
      • description: undefined | string
      • title: string
      • version: string
    • operations: any
    • servers: undefined | object
  • Gets an array of interfaces representing the configurations of registered CloudEventHandlers.

    Returns {
        description: undefined | string;
        handlers: Record<string, any>[];
        name: string;
    }

    An array of objects representing the CloudEventHandler interfaces.

    • description: undefined | string
    • handlers: Record<string, any>[]
    • name: string

    Example

    // Example usage to get the interfaces
    const interfaceInfoArray = myCloudEventRouter.getInterface();
    console.log(interfaceInfoArray);
  • Get the params of the router. Can be used for cloning

    Returns ICloudEventRouter

    a object with parameters of this object

Generated using TypeDoc