| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| README.md | ||
forge-client
The one place hyperhive builds a Forgejo client and reads a Forgejo
notification. hive-forge (the blocking CLI), hive-forge-notify (the
async poller), swarm-controller and swarm-ci-metrics share it, so a Forgejo
schema change that forgejo-api does not yet model is fixed here once.
When to use it
- Building a
forgejo_apiclient from a base URL and a token:async_client, and with thesyncfeaturesync_client. - Building the raw
reqwestclient for Forgejo's web-router-only routes (thesyncfeature):raw_blocking_client. - Deciding how long a forge call may take:
TimeoutPolicy. A caller names its policy (TimeoutPolicy::CLI, or its own value) and reads its bounds from it. - Parsing a notification thread from the forge:
NotificationThread. Every field is optional and lenient, so an unknown or reshaped field cannot fail the page the wayforgejo_api::structs::NotificationThreaddoes. - Supplying the token:
TokenSource.StaticTokenis a fixed string; a caller whose token can change implements the trait and rebuilds its client whencurrent()returns a different value.
Not here
Anything that decides what a notification means (delivery, read-state,
filtering): that stays in hive-forge-notify and hive-forge.