Expand description
The typed wire protocol for driving ryra over rpc.
This crate is the contract, and only the contract: pure serde data types,
no dependency on ryra-core (the engine). Any client - ryra-api, a control
plane, a third-party tool - can speak it without compiling the engine, which
is what makes ryra-api movable off the box later (it talks to the box’s
ryra rpc over a transport, depending only on these types).
The ryra binary owns the engine: it deserializes a Request, converts
the protocol-native request payloads into ryra_core::ops types, runs them,
and serializes a Reply. The request payloads here mirror the ops request
structs by shape (not by import), so the engine’s internal types stay
engine-private.
Structs§
- AddRequest
- Install and start a service.
- Apply
Outcome - The outcome of a mutating operation: the affected service’s fresh view plus
what the apply did.
appliedis the number of steps/changes executed (0 = nothing to do);destructiveis true when the change deletes data. - Backup
Outcome - The result of a backup run.
- Backup
Snapshot View - One restorable pre-upgrade snapshot.
- Backup
Status View - The effective backup configuration plus enrolled services
(
ryra backup status). - Choice
Option View - One alternative within a
ChoiceView. - Choice
View - A single-select
[[choice]]: pick exactly one option. - Configure
Request - Re-render an installed service with a changed integration set.
- Configure
View - The configure view for an installed service: its rendered schema plus the
selections and
.envvalues currently on disk, so a form can pre-fill. - Diff
Entry - One changed file in a
DiffView. - Diff
View - What an upgrade would change for a service.
- Doctor
Issue - One diagnostic finding.
- EnvAddition
- An env var the registry expects that the install is missing.
- EnvGroup
View - An optional, named group of env vars, enabled together.
- EnvKey
Change View - One env key a reconcile would change in a service’s
.env. - EnvVar
View - One env var as a form renders it: enough to label it, decide whether it needs input, and show whether the value is auto-generated.
- Lifecycle
Request - Start/stop a service (and its sidecars).
- Overrides
- The integration change-set for
configure.None/empty fields leave the current state untouched; provided fields are the new truth. - Reconcile
Outcome - The outcome of propagating the global config into installed services.
- Reconcile
Plan View - What a reconcile would (or did) do to one installed service.
- Registry
Info - A configured registry.
- Remove
Request - Remove a service.
- Restore
Outcome - The result of a restore.
- Revert
Outcome - The result of a revert.
- RpcError
- A structured error, mappable to a JSON-RPC error object.
- Search
Hit - One installable service from a registry search.
- Service
DefView - A service definition’s installable schema, as the install picker renders it.
- Service
View - A service as seen over the wire: the stable, serde projection of an on-disk installed service plus its live status.
- Snapshot
View - One restic data snapshot (
ryra backup list). - Upgrade
Request - Upgrade a service to the registry’s current version.
Enums§
- Auth
Kind - The kind of auth a service can be wired to.
- Auth
Requested - Whether (and how) to wire a service to the auth provider.
- Backup
Backend Spec - Where backups are stored, as a client describes one when configuring.
- Diff
Kind - How one file differs between the registry render and disk.
- EnvKind
View - How a registry env var is treated: a
defaultvalue, apromptedone the user may override, or arequiredone they must supply. - Error
Code - Coarse error categories, so a client can branch without string-matching.
- Exposure
Change - An exposure transition for
configure.Loopbackmeans “no public route”. - Exposure
Request - How a service should be exposed when installed.
- Lifecycle
- Start or stop an installed service.
- Remove
Mode - How much to remove.
- Reply
- What
ryra rpcwrites to stdout: exactly one of these per request, then it exits. - Request
- One request to the agent. Adjacently tagged so it maps straight onto a
JSON-RPC
method+params:{"method":"add","params":{...}},{"method":"list"}. - Response
- The payload of a successful response.
- Service
State - Live run state of a service.
- Severity
- Severity of a doctor finding.