Secrets

Struct Secrets 

Source
pub struct Secrets {
    pub backend_command: Option<String>,
    pub refresh_on_api_key_failure_interval: u64,
}
Expand description

Secrets management, as configured for the Core Agent.

ADP resolves no secrets itself; the Core Agent does. These settings mirror the Agent’s own configuration, and ADP reads them for one purpose: to decide whether a rejected API key might be replaced. See in_use.

Fields§

§backend_command: Option<String>

Path to the executable the Core Agent runs to fetch secrets.

Defaults to unset, and a blank value is normalized to unset. ADP does not run it. A configured command makes in_use true, which makes an intake’s 403 Forbidden response retriable. Set this only to match the Core Agent’s own configuration.

§refresh_on_api_key_failure_interval: u64

Minutes between the secret refreshes the Core Agent triggers after an API key is rejected.

Defaults to 0, which turns those refreshes off. A negative value from the source means the same thing and is clamped to 0. A positive value makes in_use true on its own, and 0 does not make it false when backend_command is set. Set this only to match the Core Agent’s own configuration.

Implementations§

Source§

impl Secrets

Source

pub const fn in_use(&self) -> bool

Returns whether secret resolution might replace a rejected API key.

This is true when a backend_command is configured or refresh_on_api_key_failure_interval is positive. Either says the key an intake just rejected may be a secret that gets re-resolved, so the same request is worth retrying. When neither is configured, nothing is going to replace the key, and retrying the request only wastes it.

Trait Implementations§

Source§

impl Clone for Secrets

Source§

fn clone(&self) -> Secrets

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 Secrets

Source§

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

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

impl Default for Secrets

Source§

fn default() -> Secrets

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

impl PartialEq for Secrets

Source§

fn eq(&self, other: &Secrets) -> 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 Serialize for Secrets

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Secrets

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.