NodeBuilder

Mutable builder for a single Node.

Usage:

val node = NodeBuilder()
.type(KrillApp.Server.Pin)
.host(serverId)
.parent(serverId)
.meta(PinMetaData(name = "fan"))
.create()

id is auto-generated as a random UUID when omitted; on a Server-typed node, parent auto-fills to id because top-level servers are their own parents in the swarm graph.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
var id: String?
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
fun host(host: String): NodeBuilder
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun node(node: Node): NodeBuilder

Seeds the builder from an existing Node — useful when callers want to alter only one or two fields and round-trip the rest.

Link copied to clipboard
fun parent(parent: String): NodeBuilder
Link copied to clipboard
Link copied to clipboard