Package-level declarations

Types

Link copied to clipboard

Extended contract for trigger and executor metadata that carries an explicit nodeAction discriminator.

Link copied to clipboard

Client-side processor contract: receives a node value emitted by the local state-flow observer and dispatches it to the UI layer.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class DataSource
Link copied to clipboard
@Serializable
enum DigitalState : Enum<DigitalState>

Binary state for nodes that represent a single on/off signal — typically GPIO pins and pin-backed abstractions (solenoids, relays, LEDs, buttons).

Link copied to clipboard

The set of events that can cause an executor / filter / trigger node to fire its work.

Link copied to clipboard
@Serializable
data class Node(val id: String, val parent: String, val host: String, val type: KrillApp, val state: NodeState = NodeState.NONE, val meta: NodeMetaData, val timestamp: Long = 0)

A single node in a Krill swarm.

Link copied to clipboard
@Serializable
enum NodeAction : Enum<NodeAction>

The verb a trigger or executor node performs when it fires.

Link copied to clipboard

Mutable builder for a single Node.

Link copied to clipboard
class NodeHttp(httpClient: HttpClient, trustHost: TrustHost, bearerTokenProvider: () -> String?)

REST + SSE-friendly client for a Krill server.

Link copied to clipboard
@Serializable
data class NodeIdentity(val nodeId: String, val hostId: String)

Address pair that uniquely identifies a node in a multi-server Krill swarm.

Link copied to clipboard
interface NodeMetaData

Marker interface that every node's per-type metadata payload must implement.

Link copied to clipboard
interface NodeObserver

Subscriber-and-dispatcher contract for the per-node state-flow streams.

Link copied to clipboard

Lifecycle / status state for every Krill node.

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

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

Link copied to clipboard

Server-side processor contract: receives a deliberate invocation and runs the node's execution logic.

Link copied to clipboard

Common contract for nodes that read from upstream sources and write to downstream targets — the executor / filter / trigger family.

Functions

Link copied to clipboard
fun StateFlow<Node>.details(): String

Same as Node.details, lifted to operate on a StateFlow<Node> directly.

Renders a debug-friendly one-liner of the node — used in log lines to give the timestamp / type / display name / state in a compact form.

Link copied to clipboard
fun Node.https(): Url

Returns the canonical https://<resolvedHost>:<port> Url for a server node. Caller must guarantee node.meta is a ServerMetaData — typically by checking node.type is KrillApp.Server.

Link copied to clipboard

Returns this node's address pair — (nodeId, hostId) — as a NodeIdentity suitable for use inside SourceMetaData source / target lists.

Link copied to clipboard
Link copied to clipboard

true when this KrillApp is a MenuCommand subtype rather than a real node type. Used to skip menu-command discriminators in iteration code that only cares about real swarm nodes.

Link copied to clipboard
fun Node.key(): String

Renders the node as a "<timestamp>:<id>" key. Used as a stable cache / comparison key in places where (timestamp, id) tuples need to be compared by value rather than by structural equality of the full node.

Link copied to clipboard

Returns the human-readable display name for the node. Each KrillApp subtype reads its name out of the appropriate concrete MetaData field.

Link copied to clipboard

For a DataPoint whose DataType is COLOR, returns the snapshot value parsed as a packed ARGB Long (0xFFRRGGBB). For any other node type or an unparseable value, returns opaque black (0xFF000000) so callers can unconditionally render the result without null-checking.

Link copied to clipboard

Maps a DigitalState to a numeric value suitable for time-series graphing and calculation nodes: ON → 1.0, OFF → 0.0.

Link copied to clipboard

Returns a copy of meta with its error field replaced by error.

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.