package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev

# Packages

# Functions

ByteSizeWithMinimum can be passed to RegisterByteSizeSetting.
ConsoleKeys return an array with all cluster settings keys used by the UI Console.
DurationInRange returns a validation option that checks the value is within the given bounds (inclusive).
DurationWithMinimum returns a validation option that checks the duration is greater or equal to the given minimum.
DurationWithMinimumOrZeroDisable returns a validation option that checks the value is at least the given minimum, or zero to disable.
EncodeBool encodes a bool in the format of EncodedValue.Value.
EncodeDuration encodes a duration in the format of EncodedValue.Value.
EncodeFloat encodes a float in the format of EncodedValue.Value.
EncodeInt encodes an int in the format of EncodedValue.Value.
EncodeProtobuf encodes a protobuf in the format of EncodedValue.Value.
FloatInRange returns a validation option that checks the value is within the given bounds (inclusive).
FloatInRangeUpperExclusive returns a validation option that checks the value is within the given bounds (inclusive lower, exclusive upper).
FloatWithMinimum returns a validation option that checks that the value is at least the given minimum.
FloatWithMinimumOrZeroDisable returns a validation option that verifies the value is at least the given minimum, or zero to disable.
IntInRange returns a validation option that checks the value is within the given bounds (inclusive).
IntInRangeOrZeroDisable returns a validation option that checks the value is within the given bounds (inclusive) or is zero (disabled).
IntWithMinimum returns a validation option that checks that the value is greater or equal to the given minimum.
IsIgnoringAllUpdates returns true if Updaters returned by NewUpdater will discard all updates due to the COCKROACH_IGNORE_CLUSTER_SETTINGS var.
Keys returns a sorted string array with all the known keys.
LookupForDisplay returns a Setting by key.
LookupForDisplayByKey returns a Setting by key.
LookupForLocalAccess returns a NonMaskedSetting by name.
LookupForLocalAccessByKey returns a NonMaskedSetting by key.
LookupForReportingByKey returns a Setting by key.
MakeVersionSetting instantiates a version setting instance.
NameToKey returns the key associated with a setting name.
NewUpdater makes an Updater.
NonNegativeDurationWithMaximum returns a validation option that checks the duration is in the range [0, maxValue].
NonNegativeFloatWithMaximum returns a validation option that checks that the value is in the range [0, maxValue].
NonNegativeIntWithMaximum returns a validation option that checks that the value is in the range [0, maxValue].
NumRegisteredSettings returns the number of registered settings.
RedactedValue returns: - a string representation of the value, if the setting is reportable; - "<redacted>" if the setting is not reportable, sensitive, or a string; - "<unknown>" if there is no setting with this name.
RegisterBoolSetting defines a new setting with type bool.
RegisterByteSizeSetting defines a new setting with type bytesize and any supplied validation function(s).
RegisterDurationSetting defines a new setting with type duration.
RegisterPublicDurationSettingWithExplicitUnit defines a new public setting with type duration which requires an explicit unit when being set.
RegisterEnumSetting defines a new setting with type int.
RegisterFloatSetting defines a new setting with type float.
RegisterIntSetting defines a new setting with type int with a validation function.
RegisterProtobufSetting defines a new setting with type protobuf.
RegisterStringSetting defines a new setting with type string.
RegisterVersionSetting adds the provided version setting to the global registry.
SettingPreviouslyHadApplicationClass returns true if the setting used to have the ApplicationLevel class.
SystemVisibleKeys returns a array with all the known keys that have the class SystemVisible.
TestingIsReportable is used in testing for reportability.
TestingIsSensitive is used in testing for sensitivity.
TestingListPrevAppSettings is exported for testing only.
TestingSaveRegistry can be used in tests to save/restore the current contents of the registry.
WithName configures the user-visible name of the setting.
WithReportable indicates whether a setting's value can show up in SHOW ALL CLUSTER SETTINGS and telemetry reports.
WithRetiredName configures a previous user-visible name of the setting, when that name was different from the key and is not in use any more.
WithValidateBool adds a validation function for a boolean setting.
WithValidateDuration adds a validation function for a duration setting.
WithValidateFloat adds a validation function for a float64 setting.
WithValidateInt adds a validation function for an int64 setting.
WithValidateProto adds a validation function for a proto setting.
WithValidateString adds a validation function for a string setting.
WithVisibility customizes the visibility of a setting.

# Constants

ApplicationLevel settings are readable and can optionally be modified by virtual clusters.
ForSystemTenant can be passed to Lookup for code that runs only on the system tenant.
ForVirtualCluster can be passed to Lookup for code that runs on virtual clusters.
MaxSettings is the maximum number of settings that the system supports.
NameActive indicates that the name is currently in use.
NameRetired indicates that the name is no longer in use.
OriginDefault indicates the value in use is the default value.
OriginExplicitlySet indicates the value is has been set explicitly.
OriginExternallySet indicates the value has been set externally, such as via a host-cluster override for this or all tenant(s).
OriginOverride indicates the value has been set via a test override.
Public indicates that a setting is documented, the range of possible values yields predictable results, and the CockroachDB team is there to assist if issues occur as a result of the customization.
Reserved - which is the default - indicates that a setting is not documented and the CockroachDB team has not developed internal experience about the impact of customizing it to other values.
SystemOnly settings are specific to the KV/storage layer and cannot be accessed from application layer code (in particular not from SQL layer nor HTTP handlers).
SystemVisible settings are specific to the KV/storage layer and are also visible to virtual clusters.
VersionSettingValueType is the value type string (m originally for "migration") used in the system.settings table.

# Variables

Fraction requires the setting to be in the interval [0, 1].
FractionUpperExclusive requires the setting to be in the interval [0, 1).
NonNegativeDuration checks that the duration is greater or equal to zero.
NonNegativeFloat checks the value is greater or equal to zero.
NonNegativeInt checks the value is zero or positive.
NonZeroFloat checks that the value is non-zero.
PositiveDuration checks that the value is strictly positive.
PositiveFloat checks that the value is strictly greater than zero.
PositiveInt can be passed to RegisterIntSetting.
ReadableTypes maps our short type identifiers to friendlier names.
Retired marks the setting as obsolete.
Sensitive marks the setting as sensitive, which means that it will always be redacted in any output.
TestOpaque can be passed to Values.Init when we are testing the settings infrastructure.
WithPublic sets public visibility.
WithUnsafe indicates that the setting is unsafe.

# 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.
DurationSettingWithExplicitUnit is like DurationSetting except it requires an explicit unit when being set.
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.
MaskedSetting is a wrapper for non-reportable settings that were retrieved for reporting (see SetReportable and LookupForReportingByKey).
A NoopUpdater ignores all updates.
ProtobufSetting is the interface of a setting variable that will be updated automatically when the corresponding cluster-wide setting of type "protobuf" is updated.
SettingOption is the type of an option that can be passed to Register.
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.
VersionSetting is the setting type that allows users to control the cluster version.

# Interfaces

AnyEnumSetting is an interface that is used when the specific enum type T is not known.
ClusterVersionImpl is used to stub out the dependency on the ClusterVersion type (in pkg/clusterversion).
NonMaskedSetting is the exported interface of non-masked settings.
Setting is the interface exposing the metadata for a cluster setting.
Updater is a helper for updating the in-memory settings.
VersionSettingImpl is the interface bridging pkg/settings and pkg/clusterversion.

# Type aliases

Class describes the scope of a setting under cluster virtualization.
InternalKey is the internal (storage) key for a cluster setting.
NameStatus indicates the status of a setting name.
SettingName represents the user-visible name of a cluster setting.
ValueOrigin indicates the origin of the current value of a setting, e.g.
Visibility describes how a user should feel confident that they can customize the setting.