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