spiral-sdk 0.1.9

Rust SDK for Spiral resource and table APIs
Documentation
// Generated by tools/service-contracts/rust.py. Do not edit.
#![doc = "Transport-independent service interface for local and remote calls."]

use async_trait::async_trait;
use spiral_contract::auth::AuthHeader;
use spiral_contract::call::CallError;

use crate::api::workers::objects::*;
/// Service implementations authenticate Authorization headers and enforce resource permissions.
#[async_trait]
pub trait WorkersApi: Send + Sync + 'static {
    /// Pause managed capacity and revoke provider access for a project.
    async fn disable_managed_workers(
        &self,
        auth_header: AuthHeader,
        project_id: String,
        provider_id: String,
    ) -> Result<ManagedWorkerProviderResponse, CallError<WorkersError>>;
    /// Grant provider access and provision managed capacity for a project.
    async fn enable_managed_workers(
        &self,
        auth_header: AuthHeader,
        project_id: String,
        provider_id: String,
    ) -> Result<ManagedWorkerProviderResponse, CallError<WorkersError>>;
    /// Read configured managed providers and their capacity for a project.
    async fn read_managed_workers(
        &self,
        auth_header: AuthHeader,
        project_id: String,
    ) -> Result<ManagedWorkersResponse, CallError<WorkersError>>;
}