Categorygithub.com/eve-tools/static-data
repositorypackage
0.0.0-20180228095719-73210b2e2a87
Repository: https://github.com/eve-tools/static-data.git
Documentation: pkg.go.dev

# README

Static Data

Build Status Go Report Card Docker Image

This service for Element43 handles all (bulk) requests for static data we currently cannot do via ESI. At the moment this is restricted to serving market type's IDs and uniform location data regarding structures/stations, solar systems, constellations and regions, acting as a kind of best-effort (more on that later) caching proxy for external APIs. Typical requests query around 1,000 locations. Location data is fetched from multiple sources, cached in-memory and persisted to disk. This prevents unnecessary requests to external APIs. Depending on the location's ID, different sources and cache exiprations are used:

  1. Stations, Solar Systems, Constellations, Regions: ESI, 24h expiry
  2. Conquerable Stations: ESI, 1h expiry
  3. Structures (citadels...): 3rd Party API, fetched in bulk every hour

Items are not deleted on expiry as the APIs can be flaky or down for extended periods of time. In case a queried entry is expired the proxy tries to retrieve location info for the entry. If the backing API is down, the expired entry is served as a fallback.

Issues can be filed here. Pull requests can be made in this repo.

Interface

The service's gRPC description can be found here.

Installation

Either use the prebuilt Docker images and pass the appropriate env vars (see below), or:

  • Install Go, clone this repo into your gopath
  • Run go get ./... to fetch the service's dependencies
  • Run bash generateProto.sh to generate the necessary gRPC-related code
  • Run go build to build the service
  • Run ./static-data to start the service

Deployment Info

Builds and releases are handled by Drone.

Environment VariableDefaultDescription
LOG_LEVELinfoThreshold for logging messages to be printed
PORT43000Port for the API to listen on
DB_PATHstatic-data.dbPath for storing the persistent location cache
ESI_HOSTesi.tech.ccp.isHostname used for accessing ESI. Change this if you proxy requests.
STRUCTURE_HUNT_HOSTstop.hammerti.me.ukHostname used for accessing the 3rd party structure hunt API. Change this if you proxy requests.
DISABLE_TLSfalseOnly check this if you're proxying API requests and terminate TLS-connections at the proxy.