pub(crate) struct Config {
version: Option<Verbosity>,
version_json: Option<Verbosity>,
log_level: LogLevel,
log_driver: LogDriver,
runtime: PathBuf,
runtime_dir: PathBuf,
runtime_root: Option<PathBuf>,
skip_fork: bool,
enable_tracing: bool,
tracing_endpoint: String,
}Expand description
A pod level OCI container runtime monitor, started by a container engine like CRI-O.
Fields§
§version: Option<Verbosity>Show version information, specify “full” for verbose output.
version_json: Option<Verbosity>Show version information as parsable JSON, specify “full” for verbose output.
log_level: LogLevelThe logging level of the server.
log_driver: LogDriverThe logging driver used by the server.
runtime: PathBufBinary path of the OCI runtime to use to operate on the containers. Required to run the server.
runtime_dir: PathBufPath of the directory for conmonrs to hold files at runtime. Required to run the server.
runtime_root: Option<PathBuf>Root directory used by the OCI runtime to operate on containers, passed to it as
--root.
skip_fork: boolStay in the foreground instead of forking into the background.
enable_tracing: boolEnable OpenTelemetry tracing. Builds without the tracing feature
ignore it with a warning.
tracing_endpoint: StringOpenTelemetry gRPC endpoint to be used for tracing. Builds without the
tracing feature ignore it.
Implementations§
Source§impl Config
impl Config
Sourcepub(crate) fn version_json(&self) -> Option<Verbosity>
pub(crate) fn version_json(&self) -> Option<Verbosity>
Show version information as JSON.
Sourcepub(crate) fn log_driver(&self) -> LogDriver
pub(crate) fn log_driver(&self) -> LogDriver
The logging driver.
Sourcepub(crate) fn runtime_is_crun(&self) -> bool
pub(crate) fn runtime_is_crun(&self) -> bool
Whether the runtime is crun, which gets arguments of its own, see
GenerateRuntimeArgs::default_args.
Sourcepub(crate) fn runtime_dir(&self) -> &Path
pub(crate) fn runtime_dir(&self) -> &Path
Path of the directory for conmonrs to hold files at runtime.
Sourcepub(crate) fn runtime_root(&self) -> Option<&Path>
pub(crate) fn runtime_root(&self) -> Option<&Path>
Root directory used by the OCI runtime.
Sourcepub(crate) fn skip_fork(&self) -> bool
pub(crate) fn skip_fork(&self) -> bool
Stay in the foreground instead of forking into the background.
Sourcepub(crate) fn enable_tracing(&self) -> bool
pub(crate) fn enable_tracing(&self) -> bool
Enable OpenTelemetry tracing.
Sourcepub(crate) fn tracing_endpoint(&self) -> &str
pub(crate) fn tracing_endpoint(&self) -> &str
OpenTelemetry gRPC endpoint.
Source§impl Config
impl Config
Sourcepub(crate) fn parse_args() -> Self
pub(crate) fn parse_args() -> Self
Parse the configuration from the command line and the environment.
Source§impl Config
impl Config
Sourcepub(crate) fn make_absolute(&mut self) -> Result<()>
pub(crate) fn make_absolute(&mut self) -> Result<()>
Make the paths absolute, the server changes into the root directory
once it started, see Server::start.
Sourcepub(crate) fn prepare(&self) -> Result<()>
pub(crate) fn prepare(&self) -> Result<()>
Create the runtime directories and remove stale sockets. Separate from
Config::validate, which only checks and changes nothing on disk.
Sourcefn socket_in_use(path: &Path) -> Result<bool>
fn socket_in_use(path: &Path) -> Result<bool>
Whether a server accepts connections on the socket. The connect does not wait for a server which does not accept them in time, a full backlog counts as in use as well. A socket of a server which exited is not in use, also if a process left behind still holds it.
Sourcefn peer_running(fd: &impl AsFd) -> bool
fn peer_running(fd: &impl AsFd) -> bool
Whether the process which listens on the other end of a connection still runs, true if that cannot be told.
Sourcepub(crate) fn conmon_pidfile(&self) -> PathBuf
pub(crate) fn conmon_pidfile(&self) -> PathBuf
The PID file the parent writes for the forked server.
Trait Implementations§
Source§impl Args for Config
impl Args for Config
Source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
ArgGroup::id][crate::ArgGroup::id] for this set of argumentsSource§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreimpl Eq for Config
Source§impl FromArgMatches for Config
impl FromArgMatches for Config
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for Config
impl Parser for Config
§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
§fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
impl StructuralPartialEq for Config
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].