schemas_v1_api_workers - OmniCloudOrg/OmniOrchestrator GitHub Wiki

workers (src/schemas/v1/api)

Path: src/schemas/v1/api/workers.rs

Module Documentation

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

Table of Contents

Public Items

async fn list_workers

Definition

pub async fn list_workers(
    page: Option<u64>,
    per_page: Option<u64>,
    pool: &State<sqlx::Pool<MySql>>,
) -> Result<Json<Vec<Worker>>, Status> {
    // ... function body
}

Documentation

List all workers with pagination support.

async fn get_worker_by_id

Definition

pub async fn get_worker_by_id(
    worker_id: i64,
    pool: &State<sqlx::Pool<MySql>>,
) -> Result<Json<Worker>, Status> {
    // ... function body
}

Documentation

Get a worker by its ID.

⚠️ **GitHub.com Fallback** ⚠️