wp-core-connectors 0.5.2

Core connector registry and sink runtimes for WarpParse
Documentation
//! Syslog 源常量与类型别名(统一复用 tcp::framing 定义)

use wp_connector_api::Tags;

pub use crate::sources::tcp::framing::{DEFAULT_TCP_RECV_BYTES, Message, STOP_CHANNEL_CAPACITY};

/// Default UDP receive buffer size (8 MB)
pub const DEFAULT_UDP_RECV_BUFFER: usize = 8 * 1024 * 1024;

/// Extract tags from `Vec<String>` items (k:v / k=v / flag)
#[allow(dead_code)]
pub fn tags_from_vec(items: &[String]) -> Tags {
    {
        let mut tags = Tags::new();
        for item in items {
            if let Some((k, v)) = item.split_once("=").or_else(|| item.split_once(":")) {
                tags.set(k, v);
            }
        }
        tags
    }
}