ArchitectureOverview
The API
An API call checks who you are, writes to the store, and puts long work in a queue.
Each /api/v1 request goes through three steps:
- The authentication check. It accepts an API token or the session cookie of the dashboard. See the security model.
- A handler. It validates the input and writes to the store.
- The engine. For all work on containers, the handler calls the engine.
Long work goes in a queue
The handler does not wait for a deploy. It answers 202 with the deploy in the queue. The client then follows the log of the deploy as a stream.
After each write, the API signals the change feed. See the API overview. Thus the dashboard updates immediately.
The crates
| Crate | Contents |
|---|---|
ferry-api | The axum router: REST, authentication (the account, its sessions and API tokens), Server-Sent Events, webhooks and blueprints. Also the OpenAPI document, Swagger UI and the web client from web/dist. |
ferry-cli | The program ferry: the command-line client. It talks only to the REST API. |
ferry-scm | The git providers (GitHub, GitLab): authorization in the browser, tokens and the list of repositories. |
ferry-api never depends on ferry-engine. It holds an Arc<dyn Engine> and calls the trait from ferry-core. See The crates.