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

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.

Functions§

build_grpc_server
Build a configured SoltiApiServer ready to mount on a tonic server.