Expand description
§solti-api - task management API.
Dual-transport API layer exposing task operations over gRPC and HTTP.
Both transports share the same wire types generated from proto/solti/v1/*.proto and delegate to an ApiHandler implementation.
| feature | transport | module |
|---|---|---|
grpc | tonic gRPC server | SoltiApiService, SoltiApiServer |
http | axum HTTP/JSON | HttpApi |
§Quick start
let adapter = SupervisorApiAdapter::new(supervisor);
let svc = SoltiApiServer::new(SoltiApiService::new(Arc::new(adapter)));
let router = HttpApi::new(Arc::new(adapter)).router();§Also
ApiHandlertransport-agnostic trait with 6 operations.ApiErrorunified error type mapped to gRPC Status / HTTP JSON.SupervisorApiAdapterdefault adapter bridging toSupervisorApi.
Re-exports§
Structs§
- HttpApi
- HTTP API service builder.
- NoOp
ApiMetrics - Zero-cost default implementation.
- Solti
ApiServer - SoltiApi provides task management on the agent side. The control-plane acts as a client calling into the agent.
- Solti
ApiService - gRPC service wrapping an
ApiHandler. - Supervisor
ApiAdapter - Adapter that bridges
SupervisorApitoApiHandler.
Enums§
Constants§
- API_
VERSION - Current API protocol version.
- MAX_
REQUEST_ BYTES - Maximum accepted request body / message size for both HTTP and gRPC transports. 4 MiB.
Traits§
- ApiHandler
- Task execution API handler.
- ApiMetrics
Backend - Metrics backend for the API layer.
Functions§
- build_
grpc_ server - Build a configured
SoltiApiServerwith no-op metrics. - build_
grpc_ server_ with_ metrics - Build a configured
SoltiApiServerwith an explicit metrics backend. - http_
metrics_ middleware - Axum middleware that records per-request HTTP metrics.
- noop_
api_ metrics - Construct a no-op handle: convenient default.
- to_
tonic_ server_ tls - Convert
solti_tls::ServerTlsConfigintotonic::transport::ServerTlsConfig.
Type Aliases§
- ApiMetrics
Handle - Shareable handle used throughout this crate.
- Output
Event Stream - Boxed stream of
OutputEvents — the wire-side surface of live task logs.