PodLogOptions

Struct PodLogOptions 

Source
pub struct PodLogOptions {
    pub container: Option<String>,
    pub follow: Option<bool>,
    pub previous: Option<bool>,
    pub since_seconds: Option<i64>,
    pub since_time: Option<Time>,
    pub timestamps: Option<bool>,
    pub tail_lines: Option<i64>,
    pub limit_bytes: Option<i64>,
    pub insecure_skip_tls_verify_backend: Option<bool>,
    pub stream: Option<String>,
}
Expand description

PodLogOptions is the query options for a Pod’s logs REST call.

Fields§

§container: Option<String>

The container for which to stream logs. Defaults to only container if there is one container in the pod. +optional

§follow: Option<bool>

Follow the log stream of the pod. Defaults to false. +optional

§previous: Option<bool>

Return previous terminated container logs. Defaults to false. +optional

§since_seconds: Option<i64>

A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified. +optional

§since_time: Option<Time>

An RFC3339 timestamp from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified. +optional

§timestamps: Option<bool>

If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false. +optional

§tail_lines: Option<i64>

If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime. Note that when “TailLines” is specified, “Stream” can only be set to nil or “All”. +optional

§limit_bytes: Option<i64>

If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit. +optional

§insecure_skip_tls_verify_backend: Option<bool>

insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real kubelet. If the kubelet is configured to verify the apiserver’s TLS credentials, it does not mean the connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept the actual log data coming from the real kubelet). +optional

§stream: Option<String>

Specify which container log stream to return to the client. Acceptable values are “All”, “Stdout” and “Stderr”. If not specified, “All” is used, and both stdout and stderr are returned interleaved. Note that when “TailLines” is specified, “Stream” can only be set to nil or “All”. +featureGate=PodLogsQuerySplitStreams +optional

Implementations§

Source§

impl PodLogOptions

Source

pub fn container(&self) -> &str

Returns the value of container, or the default value if container is unset.

Source

pub fn follow(&self) -> bool

Returns the value of follow, or the default value if follow is unset.

Source

pub fn previous(&self) -> bool

Returns the value of previous, or the default value if previous is unset.

Source

pub fn since_seconds(&self) -> i64

Returns the value of since_seconds, or the default value if since_seconds is unset.

Source

pub fn timestamps(&self) -> bool

Returns the value of timestamps, or the default value if timestamps is unset.

Source

pub fn tail_lines(&self) -> i64

Returns the value of tail_lines, or the default value if tail_lines is unset.

Source

pub fn limit_bytes(&self) -> i64

Returns the value of limit_bytes, or the default value if limit_bytes is unset.

Source

pub fn insecure_skip_tls_verify_backend(&self) -> bool

Returns the value of insecure_skip_tls_verify_backend, or the default value if insecure_skip_tls_verify_backend is unset.

Source

pub fn stream(&self) -> &str

Returns the value of stream, or the default value if stream is unset.

Trait Implementations§

Source§

impl Clone for PodLogOptions

Source§

fn clone(&self) -> PodLogOptions

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PodLogOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for PodLogOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Hash for PodLogOptions

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Message for PodLogOptions

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
Source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
Source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
Source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl PartialEq for PodLogOptions

Source§

fn eq(&self, other: &PodLogOptions) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for PodLogOptions

Source§

impl StructuralPartialEq for PodLogOptions

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.