# Tornex v0.5.1 - Table of Contents

Robust API call planning and execution for Torn City

## Pages

- [Tornex](readme.md)
- [LICENSE](license.md)
- [Cluster Mode](cluster.md)

## Modules

- [Tornex.API](Tornex.API.md): Core API functionality.
- [Tornex.HTTP.Client](Tornex.HTTP.Client.md): The behaviours of HTTP client implementations for `Tornex.API.get/1`.
- [Tornex.HTTP.FinchClient](Tornex.HTTP.FinchClient.md): The built-in HTTP client for `Tornex.API.get/1`.
- [Tornex.NodeRatelimiter](Tornex.NodeRatelimiter.md): A module backed by an ETS to mark when a node is ratelimited.
- [Tornex.PromExPlugin](Tornex.PromExPlugin.md): PromEx plugin for Tornex to export events and metrics to Prometheus.
- [Tornex.Query](Tornex.Query.md): The query struct containing API request data.
- [Tornex.Scheduler.Bucket](Tornex.Scheduler.Bucket.md): Representation of a user's bucket for API requests used for rate-limiting and prioritization.
- [Tornex.Scheduler.ExecutionUnit](Tornex.Scheduler.ExecutionUnit.md): An execution unit for the API used by the scheduler to fan out combined queries.
- [Tornex.Scheduler.QueryRegistry](Tornex.Scheduler.QueryRegistry.md): A registry for `Tornex.SpecQuery` backed by a tree held by a globally registered `GenServer`.
- [Tornex.Scheduler.Supervisor](Tornex.Scheduler.Supervisor.md): Default supervisor to supervise `Tornex.Scheduler.Bucket`, the dump timer, and the bucket registry.
The `Supervisor` can be replaced if necessary to modify bucket storage, the dump timer, etc.

- [Tornex.Scheduler.Timer](Tornex.Scheduler.Timer.md): Timer used to determine when to dump all of the buckets, see `Tornex.Scheduler.Bucket`.
By default, the bucket will be dumped every 15 seconds to allow for a maximum call rate of 
60 API requests per minute. Upon the dump timer ending, the GenServer will send a `:dump` signal to 
all `Tornex.Scheduler.Bucket` under `Tornex.Scheduler.Supervisor`.

- [Tornex.Spec](Tornex.Spec.md): Utilities for handling the OpenAPI specification and its generated client.

- [Tornex.SpecQuery](Tornex.SpecQuery.md): The query struct containing API request data for API v2 requests.
- [Tornex.Telemetry](Tornex.Telemetry.md): Telemetry for Tornex using `:telemetry`.

