docs(targets): sync AGENTS.md and test doc comments with code (#2881)

Signed-off-by: houseme <housemecn@gmail.com>
Co-authored-by: houseme <housemecn@gmail.com>
This commit is contained in:
JaySon
2026-05-09 11:06:11 +08:00
committed by GitHub
parent 9288f1ed3a
commit cb54cecf8c
5 changed files with 58 additions and 55 deletions
+9 -9
View File
@@ -270,18 +270,21 @@ impl QueuedPayload {
///
/// It includes:
/// - `Amqp`: Represents an AMQP 0-9-1 target for sending notifications to a broker.
/// - `Webhook`: Represents a webhook target for sending notifications via HTTP requests.
/// - `Kafka`: Represents a Kafka target for sending notifications to a Kafka topic.
/// - `Mqtt`: Represents an MQTT target for sending notifications via MQTT protocol.
/// - `Nats`: Represents a NATS target for sending notifications to a subject.
/// - `Pulsar`: Represents a Pulsar target for sending notifications to a topic.
/// - `Webhook`: Sends notifications via HTTP POST requests.
/// - `Kafka`: Publishes notifications to a Kafka topic.
/// - `Mqtt`: Publishes notifications via MQTT protocol.
/// - `MySql`: Writes notifications to a MySQL/TiDB table.
/// - `Nats`: Publishes notifications to a NATS subject.
/// - `Postgres`: Writes notifications to a PostgreSQL table (namespace or access format).
/// - `Pulsar`: Publishes notifications to a Pulsar topic.
/// - `Redis`: Publishes notifications to a Redis channel (pub/sub).
///
/// Each variant has an associated string representation that can be used for serialization
/// or logging purposes.
/// The `as_str` method returns the string representation of the target type,
/// and the `Display` implementation allows for easy formatting of the target type as a string.
///
/// example usage:
/// Example usage:
/// ```rust
/// use rustfs_targets::target::ChannelTargetType;
///
@@ -289,9 +292,6 @@ impl QueuedPayload {
/// assert_eq!(target_type.as_str(), "webhook");
/// println!("Target type: {}", target_type);
/// ```
///
/// example output:
/// Target type: webhook
pub enum ChannelTargetType {
Amqp,
Webhook,