ClusterAgent

Struct ClusterAgent 

Source
pub struct ClusterAgent {
    pub enabled: bool,
    pub url: Option<String>,
    pub auth_token: Option<String>,
    pub kubernetes_service_name: String,
}
Expand description

Cluster Agent connection, shared by checks, DogStatsD, and OTLP.

The defaults named on each field are the Datadog schema defaults, which translation writes whenever the key is absent. They are not the values Default produces: that is the zero value of each field, which for kubernetes_service_name is the empty string and therefore not the schema default.

Fields§

§enabled: bool

Whether the Cluster Agent connection is used.

Defaults to false. Turn it on in a deployment that runs a Cluster Agent; while it is off, nothing talks to it.

§url: Option<String>

URL of the Cluster Agent.

Defaults to unset, which leaves the endpoint to Kubernetes service discovery through kubernetes_service_name. A blank value is normalized to unset. Set this in a deployment where the Cluster Agent is not reachable through an injected Kubernetes service, and give an https endpoint: consumers use only https.

§auth_token: Option<String>

Token used to authenticate to the Cluster Agent.

Defaults to unset, which leaves the Cluster Agent unreachable: there is no anonymous access. Set it wherever the Cluster Agent is enabled, to that Agent’s own token; a blank value is normalized to unset.

§kubernetes_service_name: String

Kubernetes service name used to discover the Cluster Agent.

Defaults to datadog-cluster-agent. The name is turned into the <NAME>_SERVICE_HOST and <NAME>_SERVICE_PORT environment variables that Kubernetes injects into the pod. Set this when the Cluster Agent runs under a different service name, or set it to the empty string to turn the lookup off, which leaves url as the only way to reach the Cluster Agent.

Trait Implementations§

Source§

impl Clone for ClusterAgent

Source§

fn clone(&self) -> ClusterAgent

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 ClusterAgent

Source§

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

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

impl Default for ClusterAgent

Source§

fn default() -> ClusterAgent

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

impl PartialEq for ClusterAgent

Source§

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

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 ClusterAgent

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.