pub struct ServiceDirectories {
pub config: PathBuf,
pub state: PathBuf,
pub runtime: PathBuf,
pub logs: PathBuf,
}Expand description
The four directories the registration was installed against.
Recorded rather than re-derived, because 05-infrastructure.md item 2 speaks
of the configured cache and runtime directories: the account the service
runs under and the account that ran service install do not always resolve
the same platform-standard locations, and a claim about what the service can
write is only checkable against a specific set of paths.
Fields§
§config: PathBufNon-secret TOML and the SQLite database.
state: PathBufThe agent lock, the attempt journal, and the runner package cache.
runtime: PathBufPer-attempt disposable runner workspaces.
logs: PathBufRotating redacted diagnostics.
Implementations§
Source§impl ServiceDirectories
impl ServiceDirectories
Sourcepub fn log_file(&self) -> PathBuf
pub fn log_file(&self) -> PathBuf
The rotating diagnostic log’s stem, which is what service status
reports and what 05-infrastructure.md item 4 requires be preserved.
Sourcepub fn arguments(&self) -> [OsString; 8]
pub fn arguments(&self) -> [OsString; 8]
The four as the hidden daemon run options a registration passes them
in, SERVICE_DIRECTORY_OPTIONS order.
Sourcepub fn from_command_line(command_line: &str) -> Option<Self>
pub fn from_command_line(command_line: &str) -> Option<Self>
Reads the four back out of a registration’s command line.
None unless all four options are there: a registration made before
they existed starts the daemon against whatever its account’s
platform-standard directories are, and which those are cannot be told
from here.