xbp-oci 10.46.0

OCI registry primitives and traits for XBP deploy.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use async_trait::async_trait;

use crate::error::Result;
use crate::r#ref::OciRef;

/// Resolve digests and existence without coupling callers to a registry SDK.
#[async_trait]
pub trait OciResolver: Send + Sync {
    async fn resolve_digest(&self, image: &OciRef) -> Result<String>;
    async fn exists(&self, image: &OciRef) -> Result<bool>;
    async fn list_tags(&self, image: &OciRef, limit: Option<usize>) -> Result<Vec<String>>;
}

/// Promote/copy by digest (no rebuild).
#[async_trait]
pub trait OciPromoter: Send + Sync {
    async fn promote(&self, source: &OciRef, target: &OciRef, force: bool) -> Result<()>;
}