Expand description
The GitHub REST API as the scheduler and the history need it: queued jobs, a job’s steps, just-in-time runner
configs, repository runners and cancelling a run. Owns the token, the pages of a listing, conditional requests and
the answers kept for them, rate-limit backoff, and the count of what it asks and the limit it last read. It must
never put the token in a log line, a Debug output or an error, nor send it anywhere but its base URL, and it
decides nothing about scheduling.
Structs§
- Github
- A GitHub API client for one token. Requests on one URL are conditional on its last
ETag, so an unchanged answer costs no rate limit. - JobDetails
- A job as
GET /repos/{owner}/{repo}/actions/jobs/{id}describes it: its progress and steps. - JobStep
- A step of
JobDetails. - Pull
Request - A pull request, as
GET /repos/{owner}/{repo}/pulls/{number}says. - Queued
Job - A job waiting for a runner.
- Rate
Limit - The primary limit’s last reading: GitHub sends it with every answer, 304s included.
- Report
- What a window counted, and the limit’s last reading.
- Repository
Details - A repository, as
GET /repos/{owner}/{repo}says. - RunTrigger
- What started a workflow run, as
GET /repos/{owner}/{repo}/actions/runs/{id}says. - Runner
- A runner registered on a repository.
- Spend
- What the scheduler paces GitHub’s reads by: the limit as the last answer gave it, and how many registrations and deletes were sent since the client was made, a count no window’s line starts over.
- Tally
- How many requests of one class got each kind of answer.
- Token
- A GitHub token. Its
Debugoutput never shows the value.
Enums§
- Class
- What a request asked for, as the engine’s own work: the requests of one class cost about the same and are made for the same reason.
- Deleted
- What deleting a runner did.
- Error
- What a GitHub request can fail with. No variant holds the token.
Constants§
- API_URL
- The public API’s address.
Traits§
- Github
Api - The GitHub calls the scheduler makes.
Githubis the real client; the engine’s tests use a fake.
Functions§
- gh_
token - The
ghCLI’s token for github.com (gh auth token). - install_
crypto_ provider - Makes ring the process’s TLS crypto provider, which every
reqwest::Clientneeds: reqwest is built without one. Calling it again does nothing.
Type Aliases§
- Token
Source - Where the client gets a token: at start and again when GitHub answers 401.