Skip to main content

Crate solti

Crate solti 

Source
Expand description

§solti

Feature and namespace façade for the modular Solti SDK. It contains no runtime logic. Features select component crates and expose them under stable namespaces.

Use this crate when an agent binary needs several SDK components. Depend on a component crate directly when one component is enough.

§Start Here

  1. Choose the capabilities required by the binary.
  2. Enable their solti features.
  3. Import each component through its namespace.
  4. Build and own the application runtime.

All features are disabled by default. Higher-level features enable their required lower layers.

§Feature Flow

application features
         ▼
       solti
         ├── model ─────────────► solti-model + JSON Schema
         ├── runner ────────────► solti-runner + model + taskvisor
         ├── core ──────────────► solti-core + runner + taskvisor/controller
         ├── exec-* ────────────► solti-exec integrations
         ├── api-* ─────────────► solti-api transports and adapters
         ├── discover-* ────────► solti-discover transports
         ├── observe-* ─────────► solti-observe integrations
         ├── prometheus-* ──────► solti-prometheus integrations
         └── tls ───────────────► solti-tls

Component crates never depend on this façade. The façade preserves their ownership boundaries.

§Choose Features

NeedFeature family
Resource types and schemasmodel
Runner registrationrunner
Desired-state supervisioncore
Host process controlsexec-host-process
Subprocess executionexec-subprocess
Container engine boundaryexec-container
Native containerd 2.xexec-containerd
Seccomp host process filterexec-seccomp
HTTP task APIapi-http
gRPC task APIapi-grpc
Core API adapterapi-core-adapter
gRPC server TLSapi-grpc-tls
HTTP discoverydiscover-http
gRPC discoverydiscover-grpc
Discovery TLSdiscover-tls
Logging integrationsobserve-*
Prometheus integrationsprometheus-*
Shared TLS typestls
Taskvisor integrationstaskvisor-*

exec-seccomp enables the low-level host process filter. Combine it with exec-subprocess to filter subprocess attempts. exec-container exposes the engine-neutral container runner. exec-containerd adds the native containerd 2.x adapter.

api-http and api-grpc expose transports. They do not enable solti-core. Add api-core-adapter when the API delegates to core::SupervisorApi.

discover-http and discover-grpc select the outbound discovery transport. They do not select the task API exposed by the agent.

model includes the solti-model/schema feature. The full feature enables the complete standard integration set.

§Namespaces

NamespaceComponent crate
apisolti-api
coresolti-core
discoversolti-discover
execsolti-exec
modelsolti-model
observesolti-observe
prometheussolti-prometheus
runnersolti-runner
taskvisortaskvisor
tlssolti-tls

A namespace exists only when its owning feature is enabled. Re-exported APIs keep their component-crate paths below that namespace.

§Quick Start

Enable only the components used by the binary:

[dependencies]
solti = { version = "0.0.3", features = [
    "api-core-adapter",
    "api-http",
    "exec-subprocess",
] }

Use the canonical namespaces:

use solti::core::SupervisorApi;
use solti::exec::subprocess::register_subprocess_runner;
use solti::runner::RunnerRouter;

let mut router = RunnerRouter::new();
register_subprocess_runner(&mut router, "default")?;

let supervisor = SupervisorApi::builder(router).start().await?;

Re-exports§

pub use solti_api as api;api
pub use solti_core as core;core
pub use solti_discover as discover;discover
pub use solti_exec as exec;exec
pub use solti_model as model;model
pub use solti_observe as observe;observe
pub use solti_prometheus as prometheus;prometheus-base
pub use solti_runner as runner;runner
pub use taskvisor;taskvisor
pub use solti_tls as tls;tls