Skip to main content

OciProxy

Trait OciProxy 

Source
pub trait OciProxy {
    type Socket: Socket;

Show 23 methods // Required methods async fn list_images( &mut self, handle: u64, filter: Option<&str>, ) -> Result<Result<ListImagesReply, OciError>>; async fn oci_fsck( &mut self, handle: u64, image: Option<&str>, ) -> Result<Result<OciFsckReply, OciError>>; async fn inspect( &mut self, handle: u64, image: &str, ) -> Result<Result<OciInspectReply, OciError>>; async fn tag( &mut self, handle: u64, manifest_digest: &str, name: &str, ) -> Result<Result<(), OciError>>; async fn untag( &mut self, handle: u64, name: &str, ) -> Result<Result<(), OciError>>; async fn compute_id( &mut self, handle: u64, image: &str, verity: Option<&str>, bootable: bool, xattrs: Option<XattrFiltering>, ) -> Result<Result<OciComputeIdReply, OciError>>; async fn pull( &mut self, handle: u64, image: &str, name: Option<&str>, local_fetch: &str, storage_root: Option<&str>, bootable: bool, xattrs: Option<XattrFiltering>, expected_digest: Option<&str>, ) -> Result<impl Stream<Item = Result<Result<PullProgress, OciError>>>>; async fn get_info(&mut self) -> Result<Result<GetInfoReply, OciError>>; async fn has_layer( &mut self, handle: u64, diff_id: &str, ) -> Result<Result<HasLayerReply, OciError>>; async fn get_layer( &mut self, handle: u64, params: GetLayerParams, ) -> Result<impl Stream<Item = Result<(Result<GetLayerReply, OciError>, Vec<OwnedFd>)>>>; async fn put_layer( &mut self, handle: u64, diff_id: &str, zerocopy: bool, fds: Vec<OwnedFd>, ) -> Result<Result<PutLayerReply, OciError>>; async fn finalize_image( &mut self, handle: u64, manifest_json: &str, config_json: &str, layers: Vec<LayerRef>, name: Option<&str>, ) -> Result<Result<FinalizeImageReply, OciError>>; fn chain_list_images<'c, '__proxy_params>( &'c mut self, handle: u64, filter: Option<&'__proxy_params str>, ) -> Result<Chain<'c, Self::Socket>>; fn chain_oci_fsck<'c, '__proxy_params>( &'c mut self, handle: u64, image: Option<&'__proxy_params str>, ) -> Result<Chain<'c, Self::Socket>>; fn chain_inspect<'c, '__proxy_params>( &'c mut self, handle: u64, image: &'__proxy_params str, ) -> Result<Chain<'c, Self::Socket>>; fn chain_tag<'c, '__proxy_params>( &'c mut self, handle: u64, manifest_digest: &'__proxy_params str, name: &'__proxy_params str, ) -> Result<Chain<'c, Self::Socket>>; fn chain_untag<'c, '__proxy_params>( &'c mut self, handle: u64, name: &'__proxy_params str, ) -> Result<Chain<'c, Self::Socket>>; fn chain_compute_id<'c, '__proxy_params>( &'c mut self, handle: u64, image: &'__proxy_params str, verity: Option<&'__proxy_params str>, bootable: bool, xattrs: Option<XattrFiltering>, ) -> Result<Chain<'c, Self::Socket>>; fn chain_pull<'c, '__proxy_params>( &'c mut self, handle: u64, image: &'__proxy_params str, name: Option<&'__proxy_params str>, local_fetch: &'__proxy_params str, storage_root: Option<&'__proxy_params str>, bootable: bool, xattrs: Option<XattrFiltering>, expected_digest: Option<&'__proxy_params str>, ) -> Result<Chain<'c, Self::Socket>>; fn chain_get_info<'c>(&'c mut self) -> Result<Chain<'c, Self::Socket>>; fn chain_has_layer<'c, '__proxy_params>( &'c mut self, handle: u64, diff_id: &'__proxy_params str, ) -> Result<Chain<'c, Self::Socket>>; fn chain_put_layer<'c, '__proxy_params>( &'c mut self, handle: u64, diff_id: &'__proxy_params str, zerocopy: bool, fds: Vec<OwnedFd>, ) -> Result<Chain<'c, Self::Socket>>; fn chain_finalize_image<'c, '__proxy_params>( &'c mut self, handle: u64, manifest_json: &'__proxy_params str, config_json: &'__proxy_params str, layers: Vec<LayerRef>, name: Option<&'__proxy_params str>, ) -> Result<Chain<'c, Self::Socket>>;
}
Expand description

Typed client for the org.composefs.Oci interface.

Required Associated Types§

Source

type Socket: Socket

The socket type used for the connection.

Required Methods§

Source

async fn list_images( &mut self, handle: u64, filter: Option<&str>, ) -> Result<Result<ListImagesReply, OciError>>

List tagged OCI images.

Source

async fn oci_fsck( &mut self, handle: u64, image: Option<&str>, ) -> Result<Result<OciFsckReply, OciError>>

Run an OCI-aware consistency check (wire method Check).

Source

async fn inspect( &mut self, handle: u64, image: &str, ) -> Result<Result<OciInspectReply, OciError>>

Inspect a single OCI image.

Source

async fn tag( &mut self, handle: u64, manifest_digest: &str, name: &str, ) -> Result<Result<(), OciError>>

Tag a manifest digest with a name.

Source

async fn untag( &mut self, handle: u64, name: &str, ) -> Result<Result<(), OciError>>

Remove a tag.

Source

async fn compute_id( &mut self, handle: u64, image: &str, verity: Option<&str>, bootable: bool, xattrs: Option<XattrFiltering>, ) -> Result<Result<OciComputeIdReply, OciError>>

Compute the composefs image ID for an OCI image.

Source

async fn pull( &mut self, handle: u64, image: &str, name: Option<&str>, local_fetch: &str, storage_root: Option<&str>, bootable: bool, xattrs: Option<XattrFiltering>, expected_digest: Option<&str>, ) -> Result<impl Stream<Item = Result<Result<PullProgress, OciError>>>>

Pull an OCI image, streaming progress frames.

Source

async fn get_info(&mut self) -> Result<Result<GetInfoReply, OciError>>

Query capability tokens supported by the service.

Source

async fn has_layer( &mut self, handle: u64, diff_id: &str, ) -> Result<Result<HasLayerReply, OciError>>

Check whether a layer is present in the repository.

Source

async fn get_layer( &mut self, handle: u64, params: GetLayerParams, ) -> Result<impl Stream<Item = Result<(Result<GetLayerReply, OciError>, Vec<OwnedFd>)>>>

Stream the layer as a splitdirfdstream with full hardened fd-transport contract (sparse dirfds, keepalive, lifetime fds, multi-frame).

Drive the returned stream to completion (until continues=false), concatenating each frame’s fd batch in order to reconstruct the full logical FD array [pipe_read, dirfds.., lifetime_fds..].

Source

async fn put_layer( &mut self, handle: u64, diff_id: &str, zerocopy: bool, fds: Vec<OwnedFd>, ) -> Result<Result<PutLayerReply, OciError>>

Receive a layer as a splitdirfdstream from the client and import it into the server’s repository with diff_id verification.

fds[0] is the pipe read end; fds[1..] are source object dirs.

Source

async fn finalize_image( &mut self, handle: u64, manifest_json: &str, config_json: &str, layers: Vec<LayerRef>, name: Option<&str>, ) -> Result<Result<FinalizeImageReply, OciError>>

Finalize an OCI image after all layers have been imported.

layers must be in manifest layer order; each entry pairs the layer’s OCI diff-id with the hex verity returned by PutLayer. name is the tag to assign (optional). Idempotent.

Source

fn chain_list_images<'c, '__proxy_params>( &'c mut self, handle: u64, filter: Option<&'__proxy_params str>, ) -> Result<Chain<'c, Self::Socket>>

Start a chain with this method call.

Source

fn chain_oci_fsck<'c, '__proxy_params>( &'c mut self, handle: u64, image: Option<&'__proxy_params str>, ) -> Result<Chain<'c, Self::Socket>>

Start a chain with this method call.

Source

fn chain_inspect<'c, '__proxy_params>( &'c mut self, handle: u64, image: &'__proxy_params str, ) -> Result<Chain<'c, Self::Socket>>

Start a chain with this method call.

Source

fn chain_tag<'c, '__proxy_params>( &'c mut self, handle: u64, manifest_digest: &'__proxy_params str, name: &'__proxy_params str, ) -> Result<Chain<'c, Self::Socket>>

Start a chain with this method call.

Source

fn chain_untag<'c, '__proxy_params>( &'c mut self, handle: u64, name: &'__proxy_params str, ) -> Result<Chain<'c, Self::Socket>>

Start a chain with this method call.

Source

fn chain_compute_id<'c, '__proxy_params>( &'c mut self, handle: u64, image: &'__proxy_params str, verity: Option<&'__proxy_params str>, bootable: bool, xattrs: Option<XattrFiltering>, ) -> Result<Chain<'c, Self::Socket>>

Start a chain with this method call.

Source

fn chain_pull<'c, '__proxy_params>( &'c mut self, handle: u64, image: &'__proxy_params str, name: Option<&'__proxy_params str>, local_fetch: &'__proxy_params str, storage_root: Option<&'__proxy_params str>, bootable: bool, xattrs: Option<XattrFiltering>, expected_digest: Option<&'__proxy_params str>, ) -> Result<Chain<'c, Self::Socket>>

Start a chain with this method call.

Source

fn chain_get_info<'c>(&'c mut self) -> Result<Chain<'c, Self::Socket>>

Start a chain with this method call.

Source

fn chain_has_layer<'c, '__proxy_params>( &'c mut self, handle: u64, diff_id: &'__proxy_params str, ) -> Result<Chain<'c, Self::Socket>>

Start a chain with this method call.

Source

fn chain_put_layer<'c, '__proxy_params>( &'c mut self, handle: u64, diff_id: &'__proxy_params str, zerocopy: bool, fds: Vec<OwnedFd>, ) -> Result<Chain<'c, Self::Socket>>

Start a chain with this method call.

Source

fn chain_finalize_image<'c, '__proxy_params>( &'c mut self, handle: u64, manifest_json: &'__proxy_params str, config_json: &'__proxy_params str, layers: Vec<LayerRef>, name: Option<&'__proxy_params str>, ) -> Result<Chain<'c, Self::Socket>>

Start a chain with this method call.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<S> OciProxy for Connection<S>
where S: Socket,

Source§

type Socket = S

Source§

async fn list_images( &mut self, handle: u64, filter: Option<&str>, ) -> Result<Result<ListImagesReply, OciError>>

Source§

async fn oci_fsck( &mut self, handle: u64, image: Option<&str>, ) -> Result<Result<OciFsckReply, OciError>>

Source§

async fn inspect( &mut self, handle: u64, image: &str, ) -> Result<Result<OciInspectReply, OciError>>

Source§

async fn tag( &mut self, handle: u64, manifest_digest: &str, name: &str, ) -> Result<Result<(), OciError>>

Source§

async fn untag( &mut self, handle: u64, name: &str, ) -> Result<Result<(), OciError>>

Source§

async fn compute_id( &mut self, handle: u64, image: &str, verity: Option<&str>, bootable: bool, xattrs: Option<XattrFiltering>, ) -> Result<Result<OciComputeIdReply, OciError>>

Source§

async fn pull( &mut self, handle: u64, image: &str, name: Option<&str>, local_fetch: &str, storage_root: Option<&str>, bootable: bool, xattrs: Option<XattrFiltering>, expected_digest: Option<&str>, ) -> Result<impl Stream<Item = Result<Result<PullProgress, OciError>>>>

Source§

async fn get_info(&mut self) -> Result<Result<GetInfoReply, OciError>>

Source§

async fn has_layer( &mut self, handle: u64, diff_id: &str, ) -> Result<Result<HasLayerReply, OciError>>

Source§

async fn get_layer( &mut self, handle: u64, params: GetLayerParams, ) -> Result<impl Stream<Item = Result<(Result<GetLayerReply, OciError>, Vec<OwnedFd>)>>>

Source§

async fn put_layer( &mut self, handle: u64, diff_id: &str, zerocopy: bool, fds: Vec<OwnedFd>, ) -> Result<Result<PutLayerReply, OciError>>

Source§

async fn finalize_image( &mut self, handle: u64, manifest_json: &str, config_json: &str, layers: Vec<LayerRef>, name: Option<&str>, ) -> Result<Result<FinalizeImageReply, OciError>>

Source§

fn chain_list_images<'c, '__proxy_params>( &'c mut self, handle: u64, filter: Option<&'__proxy_params str>, ) -> Result<Chain<'c, Self::Socket>>

Source§

fn chain_oci_fsck<'c, '__proxy_params>( &'c mut self, handle: u64, image: Option<&'__proxy_params str>, ) -> Result<Chain<'c, Self::Socket>>

Source§

fn chain_inspect<'c, '__proxy_params>( &'c mut self, handle: u64, image: &'__proxy_params str, ) -> Result<Chain<'c, Self::Socket>>

Source§

fn chain_tag<'c, '__proxy_params>( &'c mut self, handle: u64, manifest_digest: &'__proxy_params str, name: &'__proxy_params str, ) -> Result<Chain<'c, Self::Socket>>

Source§

fn chain_untag<'c, '__proxy_params>( &'c mut self, handle: u64, name: &'__proxy_params str, ) -> Result<Chain<'c, Self::Socket>>

Source§

fn chain_compute_id<'c, '__proxy_params>( &'c mut self, handle: u64, image: &'__proxy_params str, verity: Option<&'__proxy_params str>, bootable: bool, xattrs: Option<XattrFiltering>, ) -> Result<Chain<'c, Self::Socket>>

Source§

fn chain_pull<'c, '__proxy_params>( &'c mut self, handle: u64, image: &'__proxy_params str, name: Option<&'__proxy_params str>, local_fetch: &'__proxy_params str, storage_root: Option<&'__proxy_params str>, bootable: bool, xattrs: Option<XattrFiltering>, expected_digest: Option<&'__proxy_params str>, ) -> Result<Chain<'c, Self::Socket>>

Source§

fn chain_get_info<'c>(&'c mut self) -> Result<Chain<'c, Self::Socket>>

Source§

fn chain_has_layer<'c, '__proxy_params>( &'c mut self, handle: u64, diff_id: &'__proxy_params str, ) -> Result<Chain<'c, Self::Socket>>

Source§

fn chain_put_layer<'c, '__proxy_params>( &'c mut self, handle: u64, diff_id: &'__proxy_params str, zerocopy: bool, fds: Vec<OwnedFd>, ) -> Result<Chain<'c, Self::Socket>>

Source§

fn chain_finalize_image<'c, '__proxy_params>( &'c mut self, handle: u64, manifest_json: &'__proxy_params str, config_json: &'__proxy_params str, layers: Vec<LayerRef>, name: Option<&'__proxy_params str>, ) -> Result<Chain<'c, Self::Socket>>

Implementors§