Skip to main content

Link

Struct Link 

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

The engine’s side of the store: where it is, the settings it hands the task, what the task last published (what clients show, and what runners get), the runners a restart adopted with the archives mounted, and the repositories jobs resolved as immutable action packages. The task publishes the runners’ view only after the store opened and a check found every file under archives/ good, and withdraws it before every check and while the archives are off; a runner reads it once as it starts. Nothing survives a restart: a new task checks before it publishes, and the store keeps the packages.

Implementations§

Source

pub fn new(directory: Option<PathBuf>, config: &Config) -> Link

The link to a store at directory, going by config.

Source

pub fn start<S: Source + 'static>(&self, source: Arc<S>) -> Option<Running>

Starts the task that owns the store, unless there is no directory. Dropping what it returns stops it.

Source

pub fn reload(&self, config: &Config)

Hands the task config’s settings, after a reload. Turned off, runners get no archives from then on; turned on again, not before the task checked them.

Source

pub fn adopted<S: BuildHasher>( &self, runner: &str, labels: &HashMap<String, String, S>, )

Notes that a restart adopted runner, if its container’s labels say it mounts the archives.

Source

pub fn recovered(&self)

Notes that recovery adopted every runner it will: the first check, which waits for this, then knows every runner that reads the archives unchecked.

Source

pub fn released(&self, runner: &str)

Notes that runner is gone.

Source

pub fn packages(&self) -> Packages

Where jobs’ logs tell of immutable action packages.

Source

pub fn status(&self) -> Option<ActionArchives>

What clients show of the store: None while it is off, or has not opened and no adopted runner reads it.

Source

pub fn runner(&self) -> Option<RunnerArchives>

What a runner container mounts and its environment gets, read once as it starts: the archives’ directory, read-only, at MOUNT, and ENV naming it, while the store is on and its last check found it good.

Trait Implementations§

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. 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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
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<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