Skip to main content

Crate ryra_protocol

Crate ryra_protocol 

Source
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.
ApplyOutcome
The outcome of a mutating operation: the affected service’s fresh view plus what the apply did. applied is the number of steps/changes executed (0 = nothing to do); destructive is true when the change deletes data.
BackupOutcome
The result of a backup run.
BackupSnapshotView
One restorable pre-upgrade snapshot.
BackupStatusView
The effective backup configuration plus enrolled services (ryra backup status).
ChoiceOptionView
One alternative within a ChoiceView.
ChoiceView
A single-select [[choice]]: pick exactly one option.
ConfigureRequest
Re-render an installed service with a changed integration set.
ConfigureView
The configure view for an installed service: its rendered schema plus the selections and .env values currently on disk, so a form can pre-fill.
DiffEntry
One changed file in a DiffView.
DiffView
What an upgrade would change for a service.
DoctorIssue
One diagnostic finding.
EnvAddition
An env var the registry expects that the install is missing.
EnvGroupView
An optional, named group of env vars, enabled together.
EnvKeyChangeView
One env key a reconcile would change in a service’s .env.
EnvVarView
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.
LifecycleRequest
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.
ReconcileOutcome
The outcome of propagating the global config into installed services.
ReconcilePlanView
What a reconcile would (or did) do to one installed service.
RegistryInfo
A configured registry.
RegistryTestView
One discoverable registry test (ryra test search).
RemoveRequest
Remove a service.
RestoreOutcome
The result of a restore.
RevertOutcome
The result of a revert.
RpcError
A structured error, mappable to a JSON-RPC error object.
SearchHit
One installable service from a registry search.
ServiceDefView
A service definition’s installable schema, as the install picker renders it.
ServiceView
A service as seen over the wire: the stable, serde projection of an on-disk installed service plus its live status.
SnapshotView
One restic data snapshot (ryra backup list).
TestEventView
One step/assertion within a test run.
TestResultEntryView
One stored test result (from a prior run).
TestRunView
The outcome of running one test (ryra test <name>).
TestStateView
Local test sandbox state: where it lives + the last stored results.
UpgradeRequest
Upgrade a service to the registry’s current version.

Enums§

AuthKind
The kind of auth a service can be wired to.
AuthRequested
Whether (and how) to wire a service to the auth provider.
BackupBackendSpec
Where backups are stored, as a client describes one when configuring.
DiffKind
How one file differs between the registry render and disk.
EnvKindView
How a registry env var is treated: a default value, a prompted one the user may override, or a required one they must supply.
ErrorCode
Coarse error categories, so a client can branch without string-matching.
ExposureChange
An exposure transition for configure. Loopback means “no public route”.
ExposureRequest
How a service should be exposed when installed.
Lifecycle
Start or stop an installed service.
RemoveMode
How much to remove.
Reply
What ryra rpc writes 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.
ServiceState
Live run state of a service.
Severity
Severity of a doctor finding.