utils

package
v0.14.4 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyClusterChanges

func ApplyClusterChanges(config *model.ClusterConfig, currentStatus *model.ClusterStatus, ensembleSupplier func(namespaceConfig *model.NamespaceConfig, status *model.ClusterStatus) ([]model.Server, error)) (
	newStatus *model.ClusterStatus,
	shardsToAdd map[int64]string,
	shardsToDelete []int64)

func GroupingCandidatesWithLabelValue

func GroupingCandidatesWithLabelValue(candidates *linkedhashset.Set[string], candidatesMetadata map[string]model.ServerMetadata) map[string]map[string]*linkedhashset.Set[string]

func GroupingShardsNodeByStatus

func GroupingShardsNodeByStatus(candidates *linkedhashset.Set[string], status *model.ClusterStatus) (map[string][]model.ShardInfo, map[string]model.Server)

func GroupingValueWithLabel

func GroupingValueWithLabel(candidates *linkedhashset.Set[string], candidatesMetadata map[string]model.ServerMetadata) map[string]*linkedhashset.Set[string]

func NodeShardLeaders added in v0.14.2

func NodeShardLeaders(candidates *linkedhashset.Set[string], status *model.ClusterStatus) (totalShards int, electedShards int, result map[string]*arraylist.List[NamespaceAndShard])

func SimpleEnsembleSupplier

func SimpleEnsembleSupplier(candidates []model.Server, nc *model.NamespaceConfig, cs *model.ClusterStatus) []model.Server

Types

type NamespaceAndShard added in v0.14.2

type NamespaceAndShard struct {
	Namespace string
	ShardID   int64
}

Jump to

Keyboard shortcuts

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