package
19.2.12+incompatible
Repository: https://github.com/cockroachdb/cockroach-gen.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
EncodeBool encodes a bool in the format parseRaw expects.
EncodeDuration encodes a duration in the format parseRaw expects.
EncodeFloat encodes a bool in the format parseRaw expects.
EncodeInt encodes an int in the format parseRaw expects.
Keys returns a sorted string array with all the known keys.
Lookup returns a Setting by name along with its description.
NewUpdater makes an Updater.
RegisterBoolSetting defines a new setting with type bool.
RegisterByteSizeSetting defines a new setting with type bytesize.
RegisterDurationSetting defines a new setting with type duration.
RegisterEnumSetting defines a new setting with type int.
RegisterFloatSetting defines a new setting with type float.
RegisterIntSetting defines a new setting with type int.
RegisterNonNegativeDurationSetting defines a new setting with type duration.
RegisterNonNegativeFloatSetting defines a new setting with type float.
RegisterNonNegativeIntSetting defines a new setting with type int.
RegisterPositiveIntSetting defines a new setting with type int.
RegisterStateMachineSetting registers a StateMachineSetting.
RegisterStringSetting defines a new setting with type string.
RegisterValidatedByteSizeSetting defines a new setting with type bytesize with a validation function.
RegisterValidatedDurationSetting defines a new setting with type duration.
RegisterValidatedFloatSetting defines a new setting with type float.
RegisterValidatedIntSetting defines a new setting with type int with a validation function.
RegisterValidatedStringSetting defines a new setting with type string with a validation function.
SanitizedValue returns a string representation of the value for settings types the are not considered sensitive (numbers, bools, etc) or <redacted> for those with values could store sensitive things (i.e.
SetCanonicalValuesContainer sets the Values container that will be refreshed at runtime -- ideally we should have no other *Values containers floating around, as they will be stale / lies.
TODO is usable at callsites that do not have *settings.Values available.
# Variables
ReadableTypes maps our short type identifiers to friendlier names.
Registry contains all defined settings, their types and default values.
TestOpaque can be passed to Values.Init when we are testing the settings infrastructure.
# Structs
BoolSetting is the interface of a setting variable that will be updated automatically when the corresponding cluster-wide setting of type "bool" is updated.
ByteSizeSetting is the interface of a setting variable that will be updated automatically when the corresponding cluster-wide setting of type "bytesize" is updated.
DurationSetting is the interface of a setting variable that will be updated automatically when the corresponding cluster-wide setting of type "duration" is updated.
EnumSetting is a StringSetting that restricts the values to be one of the `enumValues`.
FloatSetting is the interface of a setting variable that will be updated automatically when the corresponding cluster-wide setting of type "float" is updated.
IntSetting is the interface of a setting variable that will be updated automatically when the corresponding cluster-wide setting of type "int" is updated.
A NoopUpdater ignores all updates.
A StateMachineSetting is a setting that keeps a state machine driven by user input.
StringSetting is the interface of a setting variable that will be updated automatically when the corresponding cluster-wide setting of type "string" is updated.
Values is a container that stores values for all registered settings.
# Type aliases
A TransformerFn encapsulates the logic of a StateMachineSetting.