pub struct DockerCleanup {
pub host: HostId,
pub root: PathBuf,
pub config: PathBuf,
pub policy_config: PathBuf,
pub policy_log: PathBuf,
pub config_dir: PathBuf,
pub companion: Option<PathBuf>,
}Fields§
§host: HostId§root: PathBuf§config: PathBuf§policy_config: PathBufThe Docker policy’s settings. See policy.
policy_log: PathBufWhere the Docker policy records violations.
config_dir: PathBufThe configuration directory, where the protected paths are listed.
companion: Option<PathBuf>Embedders may supply the manager binary that implements companion mode.
Implementations§
Source§impl DockerCleanup
impl DockerCleanup
pub fn new(host: HostId, config_dir: &Path, state_dir: &Path) -> Self
pub fn supported() -> bool
Sourcepub fn launch_environment(
&self,
attempt: AttemptId,
repository: &str,
host_env: &RunnerEnv,
listen: Option<(PathBuf, RunnerAccount)>,
own_directories: &[PathBuf],
) -> Result<Option<OsString>>
pub fn launch_environment( &self, attempt: AttemptId, repository: &str, host_env: &RunnerEnv, listen: Option<(PathBuf, RunnerAccount)>, own_directories: &[PathBuf], ) -> Result<Option<OsString>>
A remote endpoint or explicitly selected context stays under operator control. Dependency-cache environment variables are never changed.
listen, when given, is where the proxy’s socket goes and the account
it is handed to: a runner running as another account cannot reach the
default under state/.
Sourcepub fn policy_context(
&self,
own_directories: &[PathBuf],
) -> Result<Option<Context>>
pub fn policy_context( &self, own_directories: &[PathBuf], ) -> Result<Option<Context>>
What this launch’s proxy checks: the configured mode, the job’s own
directories and the operator’s allowed ones, and the protected paths,
resolved as the host sees them. None when the policy is off and no
path is protected.
§Errors
When the policy’s settings cannot be read: a launch then fails rather than run with a policy nobody chose.
Sourcepub fn sweep(
&self,
attempts: &[RunnerAttempt],
dry_run: bool,
) -> Result<SweepReport>
pub fn sweep( &self, attempts: &[RunnerAttempt], dry_run: bool, ) -> Result<SweepReport>
Authoritative attempt states are supplied by Store, never inferred from an absent workspace or a stale timestamp. Unknown attempts are retained.
Sourcepub fn sweep_with_lookup(
&self,
lookup: &dyn Fn(AttemptId) -> Result<Option<RunnerAttempt>>,
dry_run: bool,
) -> Result<SweepReport>
pub fn sweep_with_lookup( &self, lookup: &dyn Fn(AttemptId) -> Result<Option<RunnerAttempt>>, dry_run: bool, ) -> Result<SweepReport>
Query only journalled attempt IDs rather than loading years of host history.