pub struct Config {
pub host: Host,
pub caches: Caches,
pub profiles: BTreeMap<String, Profile>,
pub repositories: Vec<Repository>,
pub history: History,
pub records: Records,
pub sizing: Sizing,
pub web: Web,
}Expand description
A parsed runnerd.toml. validate checks it against the host’s budget.
Fields§
§host: HostThe host’s budget and isolation.
caches: CachesThe caches runners share.
profiles: BTreeMap<String, Profile>Runner profiles by name.
repositories: Vec<Repository>The repositories to serve.
history: HistoryWhat is kept of past jobs.
records: RecordsHow much the records of failed jobs may keep.
sizing: SizingHow sizing advice reads the job history.
web: WebWho may use the dashboard through another address.
Implementations§
Source§impl Config
impl Config
Sourcepub fn check(
text: &str,
memory_max: impl FnOnce(&str) -> Result<Option<ByteSize>>,
) -> (Option<Config>, ConfigCheck)
pub fn check( text: &str, memory_max: impl FnOnce(&str) -> Result<Option<ByteSize>>, ) -> (Option<Config>, ConfigCheck)
Parses text and validates it against the MemoryMax that memory_max reads for the slice it names:
what runnerd check-config prints and POST /v1/config/check answers. Returns the config if it is valid.
Sourcepub fn mirror_memory(&self) -> u64
pub fn mirror_memory(&self) -> u64
The mirror’s memory cap, 0 when it is disabled.
Sourcepub fn memory_caps(&self) -> Result<ByteSize, ConfigError>
pub fn memory_caps(&self) -> Result<ByteSize, ConfigError>
The memory every runner and the mirror may use at once.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more