Expand description
§solti-discover - agent heartbeat.
Periodic sync task that registers an agent with the control plane and reports liveness and platform telemetry.
| feature | transport | protocol |
|---|---|---|
grpc | tonic gRPC client | proto/v1/sync.proto |
http | reqwest HTTP/JSON | POST /api/v1/discovery/sync |
§Quick start
let cfg = DiscoverConfig::builder(/* ... */).build()?;
let (task, spec) = solti_discover::sync(cfg)?;
supervisor.submit_with_task(task, &spec).await?;§Also
DiscoverConfig/DiscoverConfigBuilderidentity, endpoint, transport, timeouts, capabilities.DiscoverErrorconfig, transport, parse, and rejection failures.syncfactory returningResult<(TaskRef, TaskSpec), DiscoverError>.
Structs§
- Discover
Config - Agent discovery settings.
- Discover
Config Builder - Validated builder for
DiscoverConfig. - NoOp
Discover Metrics - Zero-cost default implementation that discards all events.
- Sync
Request - Sync
Response
Enums§
- Discover
Error - Discovery
Transport - Transport protocol for the sync RPC.
Constants§
- DEFAULT_
CONNECT_ TIMEOUT_ MS - Default connect timeout in milliseconds.
- DEFAULT_
REQUEST_ TIMEOUT_ MS - Default request timeout in milliseconds.
- FAIL_
AUTH - Authentication rejected.
- FAIL_
CONNECT - Canonical
reasonlabel values for heartbeat failures. - FAIL_
OTHER - Anything else.
- FAIL_
PARSE - Response body couldn’t be decoded.
- FAIL_
REJECTED_ CLIENT - Server returned a 4xx-equivalent (client-side problem: bad request, not-found, already-exists, …).
- FAIL_
REJECTED_ SERVER - Server returned a 5xx-equivalent (server-side problem: internal, unavailable, …).
- FAIL_
TIMEOUT - Transport / network timeout.
- OUTCOME_
FAILURE - See
OUTCOME_SUCCESS. - OUTCOME_
SUCCESS - Canonical
outcomelabel values (success / failure categorization).
Traits§
- Discover
Metrics Backend - Metrics backend for the discovery heartbeat task.
Functions§
- noop_
discover_ metrics - Construct a no-op handle - convenient default for
DiscoverConfig. - sync
- Build a heartbeat task and its spec from discovery config.
Type Aliases§
- Discover
Metrics Handle - Shareable handle used throughout this crate.