Documentation
¶
Overview ¶
Package configstore persists the last-known-good (LKG) NodeConfig so the node keeps serving its last applied configuration across restarts, even when the console is unreachable.
Layout (inside <state-dir>/config):
current.binpb the applied configuration (binary protobuf) previous.binpb the configuration applied before it (backup)
Writes are atomic (temp file + fsync + rename + dir fsync). Load verifies the content hash and falls back to the backup if current is corrupt.
Index ¶
Constants ¶
const ( CurrentFile = "current.binpb" PreviousFile = "previous.binpb" )
File names inside the store directory.
Variables ¶
var ErrNoConfig = errors.New("no last-known-good configuration")
ErrNoConfig is returned by Load when no configuration has been saved.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
Dir string
}
Store is a directory holding the LKG configuration.