Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotRegistered = errors.New("Not registered")
)
Functions ¶
func CheckRequirement ¶
func CheckRequirement(key, value string, getter ValueGetter) (bool, error)
CheckRequirement run check function for `key` requirement. Returns true if check is passed, false otherwise
func HasDisruption ¶ added in v0.0.6
HasDisruption run check function for `key` disruption. Returns true if disruption condition is met, false otherwise. Returns reason for true response.
func RegisterCheck ¶ added in v0.0.6
RegisterCheck add CheckFunc for some component
func RegisterDisruption ¶ added in v0.0.6
func RegisterDisruption(key string, f DisruptionFunc)
RegisterDisruption add DisruptionFunc for some component
Types ¶
type CheckFunc ¶
type CheckFunc func(requirementValue string, getter ValueGetter) (bool, error)
CheckFunc check come precondition, comparing desired value (requirementValue) with current value (getter)
type DisruptionFunc ¶ added in v0.0.6
DisruptionFunc implements inner logic to warn users about potentially dangerous changes
type ValueGetter ¶
Click to show internal directories.
Click to hide internal directories.