Skip to main content

Module node

Module node 

Source
Expand description

Per-node state and shared tracer state

Every Cardano node that connects to hermod-tracer gets a NodeState instance, which holds:

  • A unique NodeId (the socket path or ip:port of the connection)
  • A URL-safe NodeSlug derived from the node’s display name for Prometheus routes
  • A dedicated prometheus::Registry that accumulates EKG metrics for that node
  • The connection timestamp

All active nodes are tracked in the shared TracerState, which is Arc-cloned across every connection-handling task.

Structs§

NodeState
All state associated with one connected node
TracerState
State shared across all connections

Functions§

slugify
Convert an arbitrary string into a URL-safe slug: lowercase, replace non-alphanumeric chars with -, collapse runs of -.

Type Aliases§

NodeId
Unique identifier for a connected node (socket path or ip:port)
NodeSlug
URL-safe slug derived from the node’s display name, used as Prometheus route segment