heartbeat_subject (nats_subjects.rs)

clawdstrike · analytics, nats-messaging, pubsub, heartbeat-monitoring, infra

Canonical NATS subject and stream name helpers. ! ! The cloud enrollment response provides a tenant-scoped `subject_prefix`. ! All adaptive-SDR NATS channels must derive from that prefix to stay aligned ! with server-side ACLs and provisioning. / Build the heartbeat telemetry s

// Source: https://github.com/backbay-labs/clawdstrike | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
//! Canonical NATS subject and stream name helpers.
//!
//! The cloud enrollment response provides a tenant-scoped `subject_prefix`.
//! All adaptive-SDR NATS channels must derive from that prefix to stay aligned
//! with server-side ACLs and provisioning.

/// Build the heartbeat telemetry subject.
pub fn heartbeat_subject(subject_prefix: &str, agent_id: &str) -> String {
    format!("{subject_prefix}.agent.heartbeat.{agent_id}")
}

/// Build the endpoint-originated hunt event publish subject.
pub fn hunt_event_subject(subject_prefix: &str, agent_id: &str) -> String {
    format

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key