Skip to main content

Module facade

Module facade 

Source
Expand description

A staged facade that drives the whole startup sequence of a remote agent.

RemoteAgent walks through the stages in stage, each of which hands control back to the binary at the point where it has work of its own to do:

  1. RemoteAgent::start registers with the Datadog Agent, waits for the initial configuration, and reloads logging to match it. In the Started stage, the binary can check its configuration before anything else starts.
  2. RemoteAgent::initialize creates the registries and the environment provider, which opens the connections for the workload provider. In the Initialized stage, the binary builds its topology and its control plane supervisor, and adds the supervisor from RemoteAgent::create_remote_agent_supervisor to its control plane. The binary can also subscribe to Remote Configuration products through RemoteAgent::remote_config_client.
  3. RemoteAgent::run creates the internal supervisor around the binary’s control plane, validates the memory bounds of everything registered so far, and runs the supervision tree until the process is asked to shut down.

The crate documentation shows the resulting supervision tree.

Re-exports§

pub use self::stage::Initialized;
pub use self::stage::Started;
pub use self::stage::Unstarted;

Modules§

stage
The stages of the remote agent startup sequence.

Structs§

RemoteAgent
The remote agent startup sequence.

Traits§

AuthoritativeConfiguration
A remote agent’s authoritative configuration, available once the configuration authority is selected.
LocalConfiguration
A remote agent’s local configuration, loaded before it connects to the Datadog Agent.
RemoteAgentSpecification
The types that make up a remote agent.