IndexerClient
Midnight.js API Reference v2.0.2
Midnight.js API Reference / @midnight-ntwrk/midnight-js-testing / IndexerClient
Class: IndexerClient
Constructorsβ
Constructorβ
new IndexerClient(
indexerUrl,logger):IndexerClient
Creates an instance of IndexerClient.
Parametersβ
indexerUrlβ
string
The URL of the indexer service.
loggerβ
Logger
The logger instance for logging information.
Returnsβ
IndexerClient
Propertiesβ
indexerUrlβ
readonlyindexerUrl:string
Methodsβ
health()β
health():
Promise<void|AxiosResponse<any,any>>
Checks the health status of the indexer service. Makes a GET request to the status endpoint of the indexer service.
Returnsβ
Promise<void | AxiosResponse<any, any>>
A promise that resolves to the response of the health check or logs an error if the request fails.