pub struct RegistryPushTarget { /* private fields */ }Expand description
Real PushTarget backed by zlayer_registry::ImagePuller.
Constructed with an in-memory blob cache because the push path never
reads from the cache — ImagePuller’s pull-side machinery is the only
reason the cache is wired in at construction. The cache is dropped as
soon as the push completes.
Implementations§
Source§impl RegistryPushTarget
impl RegistryPushTarget
Sourcepub fn new() -> Self
pub fn new() -> Self
Construct a fresh push target backed by an in-memory blob cache.
The cache is unused on the push path but satisfies the
ImagePuller constructor contract.
§Panics
Panics only if the in-memory blob cache fails to initialise,
which the implementation does not currently allow — kept as a
panic rather than threading a Result through every push site.
Trait Implementations§
Source§impl Default for RegistryPushTarget
impl Default for RegistryPushTarget
Source§impl PushTarget for RegistryPushTarget
impl PushTarget for RegistryPushTarget
Source§fn upload_blob<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
reference: &'life1 str,
digest: &'life2 str,
media_type: &'life3 str,
data: Vec<u8>,
auth: &'life4 RegistryAuth,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn upload_blob<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
reference: &'life1 str,
digest: &'life2 str,
media_type: &'life3 str,
data: Vec<u8>,
auth: &'life4 RegistryAuth,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Source§fn put_manifest<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
reference: &'life1 str,
bytes: Vec<u8>,
content_type: &'life2 str,
auth: &'life3 RegistryAuth,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn put_manifest<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
reference: &'life1 str,
bytes: Vec<u8>,
content_type: &'life2 str,
auth: &'life3 RegistryAuth,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
PUT the pre-serialised manifest blob
bytes at reference with
Content-Type: content_type. The bytes are sent verbatim so the
foreign-layer urls[] array round-trips byte-identical between
what BuiltImage::manifest_blob computed its digest over and
what the registry indexes.Auto Trait Implementations§
impl !RefUnwindSafe for RegistryPushTarget
impl !UnwindSafe for RegistryPushTarget
impl Freeze for RegistryPushTarget
impl Send for RegistryPushTarget
impl Sync for RegistryPushTarget
impl Unpin for RegistryPushTarget
impl UnsafeUnpin for RegistryPushTarget
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> 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