A Spring Boot application which uses Quartz scheduler to periodically fetch the statuses of the running Subsquid indexers. The list of indexers is taken from Github.
A REST API GET /statuses
endpoint is provided to consume this information by bots and front-end dashboards.
For simplicity, all data retrieved by Quartz job is stored in memory.
The following environment variables affect the application:
INDEXERS_LIST
- Direct URL to file on GitHub with the list of deployed indexers URLsREPEAT_INTERVAL_SECS
- time interval (in seconds) for Quartz to re-query all the statusesCONNECT_TIMEOUT_MILLIS
- Spring Rest Template connect timeout (in ms).READ_TIMEOUT_MILLIS
- Spring Rest Template read timeout (in ms). See SO comment for context.
mvn clean package
mvn spring-boot:run
java -jar indexer-api-0.0.1-SNAPSHOT.jar
To publish the image to docker registry
mvn compile jib:build
To run the image
docker run -d -p 8080:8080 --name indexer-api isonar/subsquid-indexers-api
curl http://localhost:8080/statuses