The SDK class is the entry point to the framework. Call init() to initialize the indexer.

Hierarchy

  • SDK

Constructors

Properties

apiEndpoints: GraphQLEndpoint[] = []
defaultDataPath: string = 'data'

Methods

  • @todo: This is very similar to initMainIndexer. Can we refactor?

    Parameters

    • config: IndexerConfig
    • channels: AllWorkerChannels
    • fetchers: WorkerInfo[]

    Returns Promise<void>

  • Private

    Initializes the main indexer service. It starts the local broker and waits for all workers to be ready. It then imports the domain class, passed as a config parameter, and calls the init() method on it. If an apiSchemaPath is passed, it will create an API schema and append endpoints, but will NOT start the API.

    Parameters

    • config: IndexerConfig

      The configuration to initialize the main indexer service with.

    • channels: AllWorkerChannels

      The matrix of all possible message channels.

    • indexers: WorkerInfo[]

      List of all available workers and their state

    Returns Promise<void>

Generated using TypeDoc