schemas_v1_api_workers - OmniCloudOrg/OmniOrchestrator GitHub Wiki
Path: src/schemas/v1/api/workers.rs
Worker management module for the OmniOrchestrator API
This module provides a REST API for managing workers, including:
- Listing workers
- Creating new workers
- Updating existing workers
- Getting worker details and statistics
- Starting and stopping workers
- Scaling workers
- Deleting workers
pub async fn list_workers(
page: Option<u64>,
per_page: Option<u64>,
pool: &State<sqlx::Pool<MySql>>,
) -> Result<Json<Vec<Worker>>, Status> {
// ... function body
}
List all workers with pagination support.
pub async fn get_worker_by_id(
worker_id: i64,
pool: &State<sqlx::Pool<MySql>>,
) -> Result<Json<Worker>, Status> {
// ... function body
}
Get a worker by its ID.