-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsink.rs
More file actions
51 lines (40 loc) · 1.46 KB
/
sink.rs
File metadata and controls
51 lines (40 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
use serde::Deserialize;
#[cfg(feature = "sink-nats")]
use crate::sink::nats::NatsSinkConfig;
#[cfg(feature = "sink-redis-strings")]
use crate::sink::redis_strings::RedisStringsSinkConfig;
#[cfg(feature = "sink-redis-streams")]
use crate::sink::redis_streams::RedisStreamsSinkConfig;
#[cfg(feature = "sink-rabbitmq")]
use crate::sink::rabbitmq::RabbitmqSinkConfig;
#[cfg(feature = "sink-webhook")]
use crate::sink::webhook::WebhookSinkConfig;
/// Sink destination configuration.
///
/// Determines where replicated events are sent.
#[derive(Clone, Debug, Deserialize)]
#[serde(tag = "type", rename_all = "lowercase")]
pub enum SinkConfig {
/// In-memory sink for testing and development.
Memory,
/// Redis strings sink for key-value storage.
#[cfg(feature = "sink-redis-strings")]
#[serde(rename = "redis-strings")]
RedisStrings(RedisStringsSinkConfig),
/// Redis streams sink for append-only log storage.
#[cfg(feature = "sink-redis-streams")]
#[serde(rename = "redis-streams")]
RedisStreams(RedisStreamsSinkConfig),
/// NATS sink for pub/sub messaging.
#[cfg(feature = "sink-nats")]
#[serde(rename = "nats")]
Nats(NatsSinkConfig),
/// RabbitMQ sink for AMQP messaging.
#[cfg(feature = "sink-rabbitmq")]
#[serde(rename = "rabbitmq")]
Rabbitmq(RabbitmqSinkConfig),
/// Webhook sink for HTTP POST delivery.
#[cfg(feature = "sink-webhook")]
#[serde(rename = "webhook")]
Webhook(WebhookSinkConfig),
}