libdd-common 1.0.0

Shared utilities for Datadog libraries including HTTP/HTTPS connectors, container entity detection, tag validation, rate limiting, and Unix/Windows platform helpers
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
// Copyright 2025-Present Datadog, Inc. https://www.datadoghq.com/
// SPDX-License-Identifier: Apache-2.0

/// Trait representing a generic worker.
///
/// The worker runs an async looping function running periodic tasks.
///
/// This trait can be used to provide wrapper around a worker.
pub trait Worker {
    /// Main worker loop
    fn run(&mut self) -> impl std::future::Future<Output = ()> + Send;
}