Skip to main content

Crate solti_discover

Crate solti_discover 

Source
Expand description

§solti-discover - agent heartbeat.

Periodic sync task that registers an agent with the control plane and reports liveness and platform telemetry.

featuretransportprotocol
grpctonic gRPC clientproto/v1/sync.proto
httpreqwest HTTP/JSONPOST /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

Structs§

DiscoverConfig
Agent discovery settings.
DiscoverConfigBuilder
Validated builder for DiscoverConfig.
NoOpDiscoverMetrics
Zero-cost default implementation that discards all events.
SyncRequest
SyncResponse

Enums§

DiscoverError
DiscoveryTransport
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 reason label 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 outcome label values (success / failure categorization).

Traits§

DiscoverMetricsBackend
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§

DiscoverMetricsHandle
Shareable handle used throughout this crate.