1use std::collections::{HashMap, HashSet};
2use tokio::sync::watch;
3use vector_common::config::ComponentKey;
4use vector_common::id::Inputs;
5use vector_core::config::OutputId;
6use vector_core::fanout;
7
8#[derive(Debug, Clone, Hash, PartialEq, Eq)]
10pub struct TapOutput {
11 pub output_id: OutputId,
12 pub component_kind: &'static str,
13 pub component_type: String,
14}
15
16#[derive(Debug, Default, Clone)]
19pub struct TapResource {
20 pub outputs: HashMap<TapOutput, fanout::ControlChannel>,
22 pub inputs: HashMap<ComponentKey, Inputs<OutputId>>,
24 pub source_keys: Vec<String>,
26 pub sink_keys: Vec<String>,
28 pub removals: HashSet<ComponentKey>,
30}
31
32pub type WatchTx = watch::Sender<TapResource>;
34pub type WatchRx = watch::Receiver<TapResource>;