pub struct RemoteAgentClient { /* private fields */ }Expand description
A client for interacting with the Datadog Agent’s internal gRPC-based API.
Implementations§
Source§impl RemoteAgentClient
impl RemoteAgentClient
Sourcepub async fn connect(
config: &RemoteAgentClientConfiguration,
) -> Result<Self, GenericError>
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.
Sourcepub async fn get_hostname(&mut self) -> Result<String, GenericError>
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.
Sourcepub fn get_tagger_stream(
&mut self,
cardinality: TagCardinality,
prefixes: Option<Vec<String>>,
) -> StreamingResponse<StreamTagsResponse>
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.
Sourcepub fn get_workloadmeta_stream(
&mut self,
) -> StreamingResponse<WorkloadmetaStreamResponse>
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.
Sourcepub async fn register_remote_agent(
&mut self,
pid: u32,
display_name: &str,
flavor: &str,
api_endpoint: &str,
services: Vec<String>,
) -> Result<Response<RegisterRemoteAgentResponse>, GenericError>
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.
Sourcepub async fn refresh_remote_agent(
&mut self,
session_id: &SessionId,
) -> Result<Response<()>, GenericError>
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.
Sourcepub async fn report_remote_agent_event(
&mut self,
request: ReportRemoteAgentEventRequest,
) -> Result<Response<ReportRemoteAgentEventResponse>, GenericError>
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.
Gets the host tags from the Agent.
§Errors
If there is an error querying the Agent API, an error will be returned.
Sourcepub fn get_autodiscovery_stream(
&mut self,
) -> StreamingResponse<AutodiscoveryStreamResponse>
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.
Sourcepub fn stream_config_events(
&mut self,
session_id: &SessionId,
) -> StreamingResponse<ConfigEvent>
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
impl Clone for RemoteAgentClient
Source§fn clone(&self) -> RemoteAgentClient
fn clone(&self) -> RemoteAgentClient
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !Freeze for RemoteAgentClient
impl !RefUnwindSafe for RemoteAgentClient
impl Send for RemoteAgentClient
impl Sync for RemoteAgentClient
impl Unpin for RemoteAgentClient
impl !UnwindSafe for RemoteAgentClient
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Track for T
impl<T> Track for T
Source§fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
Tracked wrapper. Read moreSource§fn in_current_resource_group(self) -> Tracked<Self>
fn in_current_resource_group(self) -> Tracked<Self>
Tracked wrapper. Read more