Skip to main content

InMemoryRegistryMeta

Struct InMemoryRegistryMeta 

Source
pub struct InMemoryRegistryMeta { /* private fields */ }
Expand description

In-memory RegistryMeta impl for tests and single-node deployments.

Implementations§

Source§

impl InMemoryRegistryMeta

Source

pub fn new() -> Self

Construct a fresh empty registry.

Source

pub fn shared() -> Arc<dyn RegistryMeta>

Wrap in an Arc<dyn RegistryMeta> for crate::router::AppState.

Trait Implementations§

Source§

impl Default for InMemoryRegistryMeta

Source§

fn default() -> InMemoryRegistryMeta

Returns the “default value” for a type. Read more
Source§

impl RegistryMeta for InMemoryRegistryMeta

Source§

fn put_manifest<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, name: &'life1 str, reference: &'life2 Reference, digest: &'life3 Digest, media_type: &'life4 str, body: Bytes, ) -> 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, 'life4: 'async_trait,

Persist a manifest body under (name, reference). Read more
Source§

fn get_manifest<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, name: &'life1 str, reference: &'life2 Reference, ) -> Pin<Box<dyn Future<Output = Result<Option<(Digest, String, Bytes)>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Fetch a manifest by (name, reference). Read more
Source§

fn delete_manifest<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, name: &'life1 str, reference: &'life2 Reference, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Delete a manifest by (name, reference). Read more
Source§

fn list_tags<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, name: &'life1 str, last: Option<&'life2 str>, n: Option<usize>, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

List tags for name, honouring n / last pagination.
Source§

fn list_repositories<'life0, 'life1, 'async_trait>( &'life0 self, last: Option<&'life1 str>, n: Option<usize>, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List repositories (catalog endpoint).
Source§

fn start_upload<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Allocate a new upload UUID for name.
Source§

fn append_upload<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, name: &'life1 str, uuid: &'life2 str, offset: u64, chunk: Bytes, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Append chunk to the upload and return the new byte offset.
Source§

fn complete_upload<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, name: &'life1 str, uuid: &'life2 str, _digest: &'life3 Digest, ) -> 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,

Mark the upload as complete and return the buffered bytes.
Source§

fn get_upload_state<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, name: &'life1 str, uuid: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<UploadState>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Retrieve the current upload state (without consuming it).
Source§

fn cancel_upload<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, name: &'life1 str, uuid: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Cancel and discard an in-flight upload. Returns true when the upload existed.
Source§

fn list_referrers<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, name: &'life1 str, digest: &'life2 Digest, artifact_type: Option<&'life3 str>, ) -> Pin<Box<dyn Future<Output = Result<Vec<ReferrerDescriptor>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

List referrers for digest in name, filtered by artifact type.
Source§

fn take_upload_bytes<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, name: &'life1 str, uuid: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Take the accumulated upload buffer. The handler needs this on finalize to hand the bytes to the blob store.
Source§

fn register_referrer<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, name: &'life1 str, subject: &'life2 Digest, descriptor: ReferrerDescriptor, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Register a referrer descriptor against a subject digest. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,