pub struct LogsOptions {
pub stdout: bool,
pub stderr: bool,
pub since: Option<DateTime<Utc>>,
pub until: Option<DateTime<Utc>>,
pub timestamps: bool,
pub tail: Option<Tail>,
}Expand description
Options for retrieving logs from a container.
This struct provides configuration options for fetching container logs, including filtering by stream type (stdout/stderr), limiting the number of lines, and adding timestamps.
§Examples
use atlas_local::models::{LogsOptions, Tail};
let options = LogsOptions::builder()
.stdout(true)
.stderr(true)
.tail(Tail::Number(100))
.timestamps(true)
.build();Fields§
§stdout: boolReturn logs from stdout
stderr: boolReturn logs from stderr
since: Option<DateTime<Utc>>Return logs from the given timestamp
until: Option<DateTime<Utc>>Return logs before the given timestamp
timestamps: boolAdd timestamps to every log line
tail: Option<Tail>Return this number of lines at the tail of the logs
Implementations§
Source§impl LogsOptions
impl LogsOptions
Sourcepub fn builder() -> LogsOptionsBuilder<((), (), (), (), (), ())>
pub fn builder() -> LogsOptionsBuilder<((), (), (), (), (), ())>
Create a builder for building LogsOptions.
On the builder, call .stdout(...)(optional), .stderr(...)(optional), .since(...)(optional), .until(...)(optional), .timestamps(...)(optional), .tail(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of LogsOptions.
Trait Implementations§
Source§impl Clone for LogsOptions
impl Clone for LogsOptions
Source§fn clone(&self) -> LogsOptions
fn clone(&self) -> LogsOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LogsOptions
impl Debug for LogsOptions
Source§impl Default for LogsOptions
impl Default for LogsOptions
Source§fn default() -> LogsOptions
fn default() -> LogsOptions
Returns the “default value” for a type. Read more
Source§impl From<LogsOptions> for LogsOptions
impl From<LogsOptions> for LogsOptions
Source§fn from(options: LogsOptions) -> Self
fn from(options: LogsOptions) -> Self
Converts to this type from the input type.
Source§impl PartialEq for LogsOptions
impl PartialEq for LogsOptions
impl StructuralPartialEq for LogsOptions
Auto Trait Implementations§
impl Freeze for LogsOptions
impl RefUnwindSafe for LogsOptions
impl Send for LogsOptions
impl Sync for LogsOptions
impl Unpin for LogsOptions
impl UnsafeUnpin for LogsOptions
impl UnwindSafe for LogsOptions
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