Documentation
¶
Index ¶
Constants ¶
View Source
const ScanPageSize int64 = 1000
ScanPageSize is the page size used in etcd range scans.
Variables ¶
This section is empty.
Functions ¶
func BelongsToCluster ¶ added in v0.32.0
func BelongsToCluster(prefix, key string, lc logicalcluster.Name) bool
BelongsToCluster reports whether key belongs to logical cluster lc. It checks both the built-in (parts[2]) and CRD/identity-based (parts[3]) cluster positions via SplitKey.
Types ¶
type KeyParts ¶ added in v0.32.0
type KeyParts struct {
Group string
Resource string
// Segment is "customresources", an identity hash, or "" for built-in resources.
Segment string
Cluster logicalcluster.Name
// Rest is everything after the cluster segment: [<namespace>/]<name>.
Rest string
}
KeyParts holds the parsed components of an etcd key produced by SplitKey.
func SplitKey ¶ added in v0.32.0
func SplitKey(prefix, key string, lc logicalcluster.Name) (KeyParts, bool)
SplitKey parses an etcd key into its structural components. true is only returned when the key was parsed correctly into KeyParts, not if KeyParts matches the lc.
func (KeyParts) ClusterPrefix ¶ added in v0.32.0
ClusterPrefix reconstructs the etcd key prefix that scopes.
Click to show internal directories.
Click to hide internal directories.