Struct container_registry::ContainerRegistry
source · pub struct ContainerRegistry { /* private fields */ }Expand description
A container registry storing OCI containers.
Implementations§
source§impl ContainerRegistry
impl ContainerRegistry
sourcepub fn new<P>(
storage_path: P,
hooks: Box<dyn RegistryHooks>,
auth_provider: Arc<dyn AuthProvider>,
) -> Result<Arc<Self>, FilesystemStorageError>
pub fn new<P>( storage_path: P, hooks: Box<dyn RegistryHooks>, auth_provider: Arc<dyn AuthProvider>, ) -> Result<Arc<Self>, FilesystemStorageError>
Creates a new instance of the container registry.
The instance uses the filesystem as the backend to store manifests and blobs, and requires
an AuthProvider and RegistryHooks to provided. Note that it is possible to supply
() for both hooks and auth_provider.
The current implementation defaults to a filesystem based storage backend at
storage_path. It is conceivable to implement other backends, but currently not supported.
sourcepub fn make_router(self: Arc<ContainerRegistry>) -> Router
pub fn make_router(self: Arc<ContainerRegistry>) -> Router
Builds an axum::routing::Router for this registry.
Produces the core entry point for the registry; create and mount the router into an axum
application to use it.
Auto Trait Implementations§
impl Freeze for ContainerRegistry
impl !RefUnwindSafe for ContainerRegistry
impl Send for ContainerRegistry
impl Sync for ContainerRegistry
impl Unpin for ContainerRegistry
impl !UnwindSafe for ContainerRegistry
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