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

# Functions

CanDropRegion returns an error if the survival goal doesn't allow for removing regions or if the region is part of a super region.
CanSatisfySurvivalGoal returns true if the survival goal is satisfiable by the given region config.
FormatTableLocalityConfig formats the table locality.
IsMemberOfSuperRegion returns a boolean representing if the region is part of a super region and the name of the super region.
MakeRegionConfig constructs a RegionConfig.
MaybeRegionalByRowOnUpdateExpr returns a gateway region default statement if the auto rehoming session setting is enabled, nil otherwise.
PartitionByForRegionalByRow constructs the tree.PartitionBy clause for REGIONAL BY ROW tables.
RegionalByRowDefaultColDef builds the default column definition of the `crdb_region` column for REGIONAL BY ROW tables.
RegionalByRowGatewayRegionDefaultExpr builds an expression which returns the default gateway region of a REGIONAL BY ROW table.
TelemetryNameForLocality returns the telemetry name for a given locality level.
TelemetryNameForLocalityConfig returns the name to use for the given locality config.
ValidateRegionConfig validates that the given RegionConfig is valid.
ValidateSuperRegions validates that: 1.
ValidateTableLocalityConfig validates whether the descriptor's locality config is valid under the given database.
ValidateZoneConfigExtensions validates that zone configuration extensions are coherent with the rest of the multi-region configuration.
WithAddingRegions is an option to include adding regions into MakeRegionConfig.
WithSecondaryRegion is an option to include a secondary region.
WithTransitioningRegions is an option to include transitioning regions into MakeRegionConfig.

# Constants

Constants to use for telemetry for multi-region table localities.
Constants to use for telemetry for multi-region table localities.
Constants to use for telemetry for multi-region table localities.
Constants to use for telemetry for multi-region table localities.
Constants to use for telemetry for multi-region table localities.

# Variables

SynthesizeRegionConfigOptionForceSurvivalZone forces the zone survival goal instead of inheriting from the system database.
SynthesizeRegionConfigOptionForValidation includes descriptors which are being dropped as part of the regions field, allowing validation to account for regions in the process of being dropped.
SynthesizeRegionConfigOptionIncludeOffline includes offline descriptors for use in RESTORE.
SynthesizeRegionConfigOptionUseCache uses a cache for synthesizing the region config.

# Structs

RegionConfig represents the user configured state of a multi-region database.

# Type aliases

MakeRegionConfigOption is an option for MakeRegionConfig.
SynthesizeRegionConfigOption is an option to pass into SynthesizeRegionConfig.