Skip to main content

Crate solti_api

Crate solti_api 

Source
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.

featuretransportmodule
grpctonic gRPC serverSoltiApiService, SoltiApiServer
httpaxum HTTP/JSONHttpApi

§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

Re-exports§

pub use tonic;
pub use axum;

Structs§

HttpApi
HTTP API service builder.
NoOpApiMetrics
Zero-cost default implementation.
SoltiApiServer
SoltiApi provides task management on the agent side. The control-plane acts as a client calling into the agent.
SoltiApiService
gRPC service wrapping an ApiHandler.
SupervisorApiAdapter
Adapter that bridges SupervisorApi to ApiHandler.

Enums§

ApiError
Transport
Transport label value — bounded cardinality by construction.

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.
ApiMetricsBackend
Metrics backend for the API layer.

Functions§

build_grpc_server
Build a configured SoltiApiServer with no-op metrics.
build_grpc_server_with_metrics
Build a configured SoltiApiServer with 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::ServerTlsConfig into tonic::transport::ServerTlsConfig.

Type Aliases§

ApiMetricsHandle
Shareable handle used throughout this crate.
OutputEventStream
Boxed stream of OutputEvents — the wire-side surface of live task logs.