RemoteAgentClient

Struct RemoteAgentClient 

Source
pub struct RemoteAgentClient { /* private fields */ }
Expand description

A client for interacting with the Datadog Agent’s internal gRPC-based API.

Implementations§

Source§

impl RemoteAgentClient

Source

pub async fn connect( config: &RemoteAgentClientConfiguration, ) -> Result<Self, GenericError>

Connects to the Core Agent’s gRPC IPC endpoint using the given client configuration.

§Errors

If the connection can’t be established, the authentication token or IPC certificate can’t be read, or the initial health-check RPC fails, an error will be returned. Each of these is retried first.

Source

pub async fn get_hostname(&mut self) -> Result<String, GenericError>

Gets the detected hostname from the Agent.

§Errors

If there is an error querying the Agent API, an error will be returned.

Source

pub fn get_tagger_stream( &mut self, cardinality: TagCardinality, prefixes: Option<Vec<String>>, ) -> StreamingResponse<StreamTagsResponse>

Gets a stream of tagger entities at the given cardinality, optionally limited to a set of entity ID prefixes.

When prefixes is given, the server only sends events for entities whose ID carries one of those prefixes, which avoids paying the serialization and bandwidth cost of entities that the caller has no use for. Passing None applies no filtering, and the server sends events for every prefix it knows about.

If there is an error with the initial request, or an error occurs while streaming, the next message in the stream will be Some(Err(status)), where the status indicates the underlying error.

Source

pub fn get_workloadmeta_stream( &mut self, ) -> StreamingResponse<WorkloadmetaStreamResponse>

Gets a stream of all workloadmeta entities.

If there is an error with the initial request, or an error occurs while streaming, the next message in the stream will be Some(Err(status)), where the status indicates the underlying error.

Source

pub async fn register_remote_agent( &mut self, pid: u32, display_name: &str, flavor: &str, api_endpoint: &str, services: Vec<String>, ) -> Result<Response<RegisterRemoteAgentResponse>, GenericError>

Registers a Remote Agent with the Agent.

§Errors

If there is an error sending the request to the Agent API, an error will be returned.

Source

pub async fn refresh_remote_agent( &mut self, session_id: &SessionId, ) -> Result<Response<()>, GenericError>

Refreshes the given remote agent session with the Agent.

§Errors

If there is an error sending the request to the Agent API, an error will be returned.

Source

pub async fn report_remote_agent_event( &mut self, request: ReportRemoteAgentEventRequest, ) -> Result<Response<ReportRemoteAgentEventResponse>, GenericError>

Reports one or more operational events for a remote agent session to the Agent.

§Errors

If there is an error sending the request to the Agent API, an error will be returned.

Source

pub async fn get_host_tags( &self, ) -> Result<Response<HostTagReply>, GenericError>

Gets the host tags from the Agent.

§Errors

If there is an error querying the Agent API, an error will be returned.

Source

pub fn get_autodiscovery_stream( &mut self, ) -> StreamingResponse<AutodiscoveryStreamResponse>

Gets a stream of autodiscovery config updates.

If there is an error with the initial request, or an error occurs while streaming, the next message in the stream will be Some(Err(status)), where the status indicates the underlying error.

Source

pub fn stream_config_events( &mut self, session_id: &SessionId, ) -> StreamingResponse<ConfigEvent>

Gets a stream of config events.

If there is an error with the initial request, or an error occurs while streaming, the next message in the stream will be Some(Err(status)), where the status indicates the underlying error.

Trait Implementations§

Source§

impl Clone for RemoteAgentClient

Source§

fn clone(&self) -> RemoteAgentClient

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

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> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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> Track for T

Source§

fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>

Instruments this type by attaching the given resource group token, returning a Tracked wrapper. Read more
Source§

fn in_current_resource_group(self) -> Tracked<Self>

Instruments this type by attaching the current resource group, returning a Tracked wrapper. 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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> CloneAny for T
where T: Any + Clone,