Skip to main content

Crate coglet

Crate coglet 

Source
Expand description

coglet: Rust execution engine for cog models.

Re-exports§

pub use orchestrator::Orchestrator;
pub use service::PredictionHandle;
pub use service::SyncPredictionGuard;
pub use input_validation::InputValidator;
pub use service::CreatePredictionError;
pub use service::HealthSnapshot;
pub use service::PredictionService;
pub use worker::PredictHandler;
pub use worker::PredictResult;
pub use worker::SetupError;
pub use worker::SetupLogHook;
pub use worker::SlotSender;
pub use worker::WorkerConfig;
pub use worker::run_worker;

Modules§

bridge
IPC bridge for coglet parent-worker communication.
input_validation
Input validation against the OpenAPI schema.
orchestrator
Orchestrator - manages worker subprocess lifecycle and event loop.
permit
Permit pool for concurrent slot management.
service
PredictionService: Transport-agnostic prediction lifecycle management.
transport
Transport layer for coglet.
webhook
Webhook sender for async predictions.
worker
Worker subprocess - runs inside the Python subprocess.

Structs§

CancellationToken
A token which can be used to signal a cancellation request to one or more tasks.
Prediction
Prediction lifecycle state.
PredictionGuard
RAII guard for prediction lifecycle timing.
PredictionMetrics
Metrics collected during prediction.
PredictionResult
Result of a completed prediction.
SetupLogAccumulator
SetupResult
Result of the setup phase.
VersionInfo
Version information for the runtime.

Enums§

Health
Health status of the coglet runtime.
PredictionError
PredictionOutput
Prediction output - single value or streamed chunks.
PredictionStatus
SetupStatus
Status of the setup phase.

Constants§

COGLET_VERSION
Coglet version from Cargo.toml

Functions§

drain_accumulated_logs
install_crypto_provider
Install the ring TLS crypto provider for rustls.