NodeWire

@Serializable
data class NodeWire(val timestamp: Long, val installId: String, host: String, val port: Int, val platform: Platform, val clusterToken: String = "")(source)

The minimal payload required to discover and connect to a Krill peer.

Marshalled as JSON inside a UDP datagram, so the field set is deliberately small (datagram size limits) and primitive (no nested collections / nodes) — heavier metadata is fetched later via the HTTP /health and /nodes endpoints once the receiver has decided to connect.

Constructors

Link copied to clipboard
constructor(timestamp: Long, installId: String, host: String, port: Int, platform: Platform, clusterToken: String = "")

Properties

Link copied to clipboard

PIN-derived rolling token (see krill.zone.shared.security.PinDerivation.deriveBeaconToken) proving cluster membership. Receivers MUST verify this against their own derivation before treating the sender as a swarm peer; mismatches indicate a beacon from a different swarm sharing the LAN.

Link copied to clipboard

Stable per-installation UUID of the sender — survives restarts; lets receivers de-duplicate beacons across IP changes.

Link copied to clipboard

What kind of device the sender is — drives the icon shown in the swarm UI.

Link copied to clipboard
val port: Int

TCP port the sender's HTTP/SSE server is listening on.

Link copied to clipboard

Wall-clock time the beacon was generated, epoch millis. Used to discard stale captures.

Functions

Link copied to clipboard
fun host(): String

Returns the host field with whitespace, newlines, and accidental http:// / https:// prefixes stripped.

Link copied to clipboard

Returns the canonical https://<host>:<port> URL for this peer's HTTP/SSE endpoint. Krill requires TLS on every interconnect, so the scheme is always https.