pub struct BuildahSidecarBackend { /* private fields */ }Expand description
gRPC-client backend for the zlayer-buildd sidecar.
Construction does not connect or spawn — that happens lazily on the
first call to BuildahSidecarBackend::lifecycle (or via
is_available, which probes spawn-and-handshake). The backend:
- holds the resolved
SidecarConfig(transport address, TLS dir, idle timeout), - owns the
SidecarLifecyclemanager that spawns / dials the sidecar and caches the gRPC channel, - returns
BuildError::NotSupportedfrom every trait method until tasks 3.3 / 3.4 wire the build flow through the gRPC channel.
Implementations§
Source§impl BuildahSidecarBackend
impl BuildahSidecarBackend
Sourcepub const NAME: &'static str = "buildah-sidecar"
pub const NAME: &'static str = "buildah-sidecar"
Stable trait-level name. Mirrors BuildBackend::name.
Sourcepub fn new(config: SidecarConfig) -> Self
pub fn new(config: SidecarConfig) -> Self
Create a new sidecar backend with the supplied configuration.
Sourcepub fn config(&self) -> &SidecarConfig
pub fn config(&self) -> &SidecarConfig
Borrow the underlying configuration.
Sourcepub fn lifecycle(&self) -> &Arc<SidecarLifecycle>
pub fn lifecycle(&self) -> &Arc<SidecarLifecycle>
Access the lifecycle manager. Used by the RPC wiring landing in
tasks 3.3 / 3.4 to acquire a live BuildServiceClient.
Trait Implementations§
Source§impl BuildBackend for BuildahSidecarBackend
impl BuildBackend for BuildahSidecarBackend
Source§fn build_image<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 Path,
dockerfile: &'life2 Dockerfile,
options: &'life3 BuildOptions,
event_tx: Option<Sender<BuildEvent>>,
) -> Pin<Box<dyn Future<Output = Result<BuiltImage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn build_image<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 Path,
dockerfile: &'life2 Dockerfile,
options: &'life3 BuildOptions,
event_tx: Option<Sender<BuildEvent>>,
) -> Pin<Box<dyn Future<Output = Result<BuiltImage>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Build a container image from a parsed Dockerfile. Read more
Source§fn push_image<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tag: &'life1 str,
auth: Option<&'life2 RegistryAuth>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn push_image<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tag: &'life1 str,
auth: Option<&'life2 RegistryAuth>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Push an image to a container registry.
Source§fn tag_image<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
image: &'life1 str,
new_tag: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn tag_image<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
image: &'life1 str,
new_tag: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Tag an existing image with a new name.
Source§fn manifest_create<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn manifest_create<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create a new (empty) manifest list.
Source§fn manifest_add<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
manifest: &'life1 str,
image: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn manifest_add<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
manifest: &'life1 str,
image: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Add an image to an existing manifest list.
Source§fn manifest_push<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
name: &'life1 str,
destination: &'life2 str,
auth: Option<&'life3 RegistryAuth>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn manifest_push<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
name: &'life1 str,
destination: &'life2 str,
auth: Option<&'life3 RegistryAuth>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Push a manifest list (and all referenced images) to a registry. Read more
Source§fn is_available<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn is_available<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns
true if the backend tooling is installed and functional.Source§fn name(&self) -> &'static str
fn name(&self) -> &'static str
Human-readable name for this backend (e.g.
"buildah", "sandbox").Source§fn export_oci_archive<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tag: &'life1 str,
dest: &'life2 Path,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn export_oci_archive<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tag: &'life1 str,
dest: &'life2 Path,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Export the built image
tag to an OCI image-layout archive (tar) at
dest, in the format [zlayer_registry::import_image] consumes
(oci-layout + index.json + blobs/sha256/*). Read moreSource§impl Clone for BuildahSidecarBackend
impl Clone for BuildahSidecarBackend
Source§fn clone(&self) -> BuildahSidecarBackend
fn clone(&self) -> BuildahSidecarBackend
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BuildahSidecarBackend
impl Debug for BuildahSidecarBackend
Auto Trait Implementations§
impl !RefUnwindSafe for BuildahSidecarBackend
impl !UnwindSafe for BuildahSidecarBackend
impl Freeze for BuildahSidecarBackend
impl Send for BuildahSidecarBackend
impl Sync for BuildahSidecarBackend
impl Unpin for BuildahSidecarBackend
impl UnsafeUnpin for BuildahSidecarBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request