Skip to main content

Registry

Struct Registry 

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

The daemon’s handle on the registry.

Implementations§

Source§

impl Registry

Source

pub fn open(base: &Client, state: Option<&Path>) -> Result<Option<Registry>>

The registry as set up on this host, or None when it is not. state is the daemon’s state directory, for the push index.

Source

pub fn shared(base: &Client) -> Result<Arc<Registry>>

The installed registry, else the host’s with the default state dir.

Source

pub fn info(&self) -> &Info

Source

pub fn remote(&self) -> &Remote

Source

pub fn push( &self, org: &OrgId, app: &str, tag: &str, tar: &Path, log: &mut dyn FnMut(&str), ) -> Result<String>

Push an OCI layout tar as <org>/<app>:<tag>. Returns the digest.

Source

pub fn resolve(&self, org: &OrgId, r: &ImageRef) -> Result<String>

The digest an org’s registry: image names now.

Source

pub fn list(&self, org: Option<&OrgId>) -> Result<Vec<RepoInfo>>

Repositories and their tags, of one org or all.

Source

pub fn delete_tags( &self, org: &OrgId, app: &str, doomed: &dyn Fn(&str) -> bool, spare: &BTreeSet<String>, ) -> Result<Vec<String>>

Delete the manifests of <org>/<app> whose every tag doomed picks, except spare digests (what is deployed). A digest that another tag still names stays, and so does that tag: the registry deletes manifests, not tags. Returns digest (tags) of each one deleted. Blobs go at the next registry gc.

Source

pub fn gc( &self, keep: usize, protected: &BTreeSet<String>, dry_run: bool, log: &mut dyn FnMut(&str), ) -> Result<GcReport>

Retention: per repository keep the newest keep tags and every protected repo@digest (what deployed stacks, current and previous, run), delete the other manifests, then have the registry collect unreferenced blobs. Pushes wait meanwhile.

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V