Chore: rename flow endpoint startup helpers

This commit is contained in:
Herbert Wolverson committed 2026-03-12 15:02:52 -05:00
1 parent 1f116eeaf1
commit 50a657f5c8
4 files changed
+6 -6

No files matched your search

@@ -437,7 +437,7 @@ pub static RECENT_FLOWS: Lazy<TimeBuffer> = Lazy::new(TimeBuffer::new);
pub struct FinishedFlowAnalysis {}
impl FinishedFlowAnalysis {
pub fn new() -> Sender<(FlowbeeKey, (FlowbeeLocalData, FlowAnalysis))> {
pub fn start() -> Sender<(FlowbeeKey, (FlowbeeLocalData, FlowAnalysis))> {
debug!("Created Flow Analysis Endpoint");
let (tx, rx) =
crossbeam_channel::bounded::<(FlowbeeKey, (FlowbeeLocalData, FlowAnalysis))>(65535);
@@ -38,7 +38,7 @@ pub fn setup_netflow_tracker() -> Result<Sender<(FlowbeeKey, (FlowbeeLocalData,
// Build the endpoints list
let mut endpoints: Vec<Sender<(FlowbeeKey, (FlowbeeLocalData, FlowAnalysis))>> =
Vec::new();
endpoints.push(FinishedFlowAnalysis::new());
endpoints.push(FinishedFlowAnalysis::start());
if let Some(flow_config) = &config.flows
&& let (Some(ip), Some(port), Some(version)) = (
@@ -52,13 +52,13 @@ pub fn setup_netflow_tracker() -> Result<Sender<(FlowbeeKey, (FlowbeeLocalData,
match version {
5 => {
let endpoint =
Netflow5::new(target).expect("Cannot parse endpoint for netflow v5");
Netflow5::start(target).expect("Cannot parse endpoint for netflow v5");
endpoints.push(endpoint);
info!("Netflow 5 endpoint added");
}
9 => {
let endpoint =
Netflow9::new(target).expect("Cannot parse endpoint for netflow v9");
Netflow9::start(target).expect("Cannot parse endpoint for netflow v9");
endpoints.push(endpoint);
info!("Netflow 9 endpoint added");
}
@@ -10,7 +10,7 @@ use std::{net::UdpSocket, sync::atomic::AtomicU32};
pub(crate) struct Netflow5 {}
impl Netflow5 {
pub(crate) fn new(
pub(crate) fn start(
target: String,
) -> anyhow::Result<Sender<(FlowbeeKey, (FlowbeeLocalData, FlowAnalysis))>> {
let (tx, rx) =
@@ -11,7 +11,7 @@ mod protocol;
pub(crate) struct Netflow9 {}
impl Netflow9 {
pub(crate) fn new(
pub(crate) fn start(
target: String,
) -> anyhow::Result<Sender<(FlowbeeKey, (FlowbeeLocalData, FlowAnalysis))>> {
let (tx, rx) =