etcd

package
v0.32.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

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

func (p KeyParts) ClusterPrefix(storagePrefix string) string

ClusterPrefix reconstructs the etcd key prefix that scopes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL