Documentation
¶
Overview ¶
Package apply keeps the overlay file equal to the settings and the bound hooks: rendered at start, after every settings change and every binding change, and every resync interval (a file someone replaced).
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotWritten = errors.New("the overlay has not been written yet")
ErrNotWritten: the overlay has not been written yet.
Functions ¶
This section is empty.
Types ¶
type Applier ¶
Applier owns the overlay file.
func New ¶
func New( parent deps.Scope, path string, mode os.FileMode, settings config.Live[overlay.Settings], salt config.Live[config.Secret], f *flows.Flows, w overlay.Wiring, ) *Applier
New creates the applier; an empty path renders without writing.
func (*Applier) Masked ¶
Masked is the overlay for the current settings with every secret (the pairwise salt, the callbacks key) masked.
type State ¶
type State struct {
// Path of the file; empty: snippets mode (nothing written).
Path string
// Content is the last rendering (secrets in it).
Content []byte
// Hash of Content; WrittenAt when it reached the file.
Hash string
WrittenAt time.Time
// Err is why the last rendering was not written; the file keeps the
// previous one.
Err error
}
State is what the applier last did.
Click to show internal directories.
Click to hide internal directories.