Documentation
¶
Overview ¶
Package nodegroup is the node-group definition store: named collections of Data-Plane nodes matched by label selectors (geo-aware grouping, tiered routing, policy scoping), with atomic JSON persistence. It is extracted from package main per ADR-0002; the admin API handlers, the EnrolledNode-typed membership filter, and the globalNodeGroups singleton stay in main (nodegroup.go shim).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LabelsMatch ¶
LabelsMatch returns true when every k/v in selector exists in labels.
Types ¶
type Group ¶
type Group struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
LabelSelector map[string]string `json:"label_selector"` // all must match
Priority int `json:"priority,omitempty"`
CreatedAt string `json:"created_at"`
}
Group defines a named collection of Data Plane nodes matched by label selectors. Used for geo-aware grouping, tiered routing, and policy scoping.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store persists node group definitions to a JSON file.
func (*Store) MatchingGroups ¶
MatchingGroups returns the names of groups whose label selectors are satisfied by the given labels map. A group matches when every key-value pair in its LabelSelector exists in labels.
func (*Store) ReplaceAll ¶
ReplaceAll atomically replaces all groups (used by config snapshot sync).