pub trait LocalConfiguration<R: RemoteAgentSpecification>:
Send
+ Sized
+ 'static {
// Required methods
fn is_standalone(&self) -> bool;
fn client_configuration(
&self,
) -> Result<RemoteAgentClientConfiguration, GenericError>;
fn advertised_secure_api_address(
&self,
) -> Result<ListenAddress, GenericError>;
fn connect(
self,
config_stream: Receiver<ConfigUpdate>,
) -> impl Future<Output = Result<(R::AuthoritativeConfiguration, R::ConfigurationUpdates), GenericError>> + Send;
fn into_standalone(
self,
) -> impl Future<Output = Result<R::AuthoritativeConfiguration, GenericError>> + Send;
}Expand description
A remote agent’s local configuration, loaded before it connects to the Datadog Agent.
This is the configuration from local sources only, such as a configuration file and environment variables. It
decides whether the remote agent runs standalone, and how it reaches the Datadog Agent. It then becomes the remote
agent’s AuthoritativeConfiguration, either by layering the Datadog Agent’s configuration stream on top of it or,
in standalone mode, on its own.
Required Methods§
Sourcefn is_standalone(&self) -> bool
fn is_standalone(&self) -> bool
Returns true if the remote agent runs without the Datadog Agent.
Sourcefn client_configuration(
&self,
) -> Result<RemoteAgentClientConfiguration, GenericError>
fn client_configuration( &self, ) -> Result<RemoteAgentClientConfiguration, GenericError>
Returns the configuration for connecting to the Datadog Agent.
§Errors
If the configuration is invalid, an error is returned.
Sourcefn advertised_secure_api_address(&self) -> Result<ListenAddress, GenericError>
fn advertised_secure_api_address(&self) -> Result<ListenAddress, GenericError>
Returns the secure API address that the remote agent advertises when it registers with the Datadog Agent.
§Errors
If the configured address is invalid, an error is returned.
Sourcefn connect(
self,
config_stream: Receiver<ConfigUpdate>,
) -> impl Future<Output = Result<(R::AuthoritativeConfiguration, R::ConfigurationUpdates), GenericError>> + Send
fn connect( self, config_stream: Receiver<ConfigUpdate>, ) -> impl Future<Output = Result<(R::AuthoritativeConfiguration, R::ConfigurationUpdates), GenericError>> + Send
Selects the Datadog Agent’s configuration stream as the configuration authority.
Waits for the initial snapshot from config_stream, and returns the resulting configuration along with the
updates that apply each later snapshot.
§Errors
If the stream closes before its initial snapshot, or the resulting configuration is invalid, an error is returned.
Sourcefn into_standalone(
self,
) -> impl Future<Output = Result<R::AuthoritativeConfiguration, GenericError>> + Send
fn into_standalone( self, ) -> impl Future<Output = Result<R::AuthoritativeConfiguration, GenericError>> + Send
Selects the local configuration as the configuration authority, for standalone mode.
§Errors
If the local configuration is invalid, an error is returned.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.