Skip to main content

Module sync

Module sync 

Source
Expand description

Sync provider abstraction for file synchronization operations.

This module defines the SyncProvider trait that allows different types of file synchronization (ignore files, codeowners, cubes, CI workflows) to be implemented in their respective crates and used uniformly by the CLI.

§Architecture

Each sync provider crate (cuenv-ignore, cuenv-codeowners, etc.) implements the SyncProvider trait. The CLI loads the CUE module once and passes it to providers, avoiding redundant evaluation.

§Example

use cuenv_core::sync::{SyncProvider, SyncOptions, SyncContext};

// CLI loads module once
let module = load_module(&cwd, package)?;

// Pass to each provider
for provider in providers {
    let result = provider.sync(&SyncContext {
        module: &module,
        options: &options,
    }).await?;
}

Structs§

SyncContext
Context for sync operations.
SyncOptions
Options passed to sync operations.
SyncResult
Result of a sync operation.

Enums§

SyncMode
Mode of operation for sync commands.

Traits§

SyncProvider
Trait for sync providers.