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§impl Link
impl Link
Sourcepub fn new(directory: Option<PathBuf>, config: &Config) -> Link
pub fn new(directory: Option<PathBuf>, config: &Config) -> Link
The link to a store at directory, going by config.
Sourcepub fn start<S: Source + 'static>(&self, source: Arc<S>) -> Option<Running>
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.
Sourcepub fn reload(&self, config: &Config)
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.
Sourcepub fn adopted<S: BuildHasher>(
&self,
runner: &str,
labels: &HashMap<String, String, S>,
)
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.
Sourcepub fn recovered(&self)
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.
Sourcepub fn status(&self) -> Option<ActionArchives>
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.