Documentation
¶
Overview ¶
Package toggle evaluates feature-toggle targeting rules and composes the per-harness settings fragments a release carries for client-axis toggles. Rule evaluation is pure and deterministic; percent rollouts hash through internal/assign (the single hashing source) under a per-toggle salt.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delta ¶
Delta returns the JSON delta turning base into on for the file at p, or nil when they are equal. A nil base means the toggle adds the file.
Types ¶
type Decision ¶
type Decision struct {
Name string `json:"name"`
On bool `json:"on"`
// Rule is the index of the deciding rule, -1 when the default applied.
Rule int `json:"rule"`
// Killed: the name is on the signed kill list, so On is false whatever the rules say.
Killed bool `json:"killed,omitempty"`
Why string `json:"why"`
Trace []string `json:"trace"`
}
Decision is one toggle's outcome with the reasoning behind it.
Click to show internal directories.
Click to hide internal directories.