guide

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Performance name creates 3 CN, 3 DN, 1 GMS and maximizes the use of resources
	// usage: performance(labels=(zone-a))
	// in which the labels describe where to schedule the nodes
	Performance modeName = "performance"
	// Minimum name creates 1 CN (2c4g) + 1 DN (2c4g), in which GMS in dn-0
	Minimum modeName = "minimum"
	// MinimumCDC name creates 1 CN + 1 DN + 1 GMS + 1 CDC all in 4c8g
	MinimumCDC modeName = "minimum-cdc"
	// Custom name allows user to specific both resources and replicas
	// usage: custom(CN=(1,2c4g),DN=(,4c8g,single-replica),GMS=(1,))
	// in which the former number indicates replicas and the later letters indicate resource
	Custom modeName = "custom"
	// QuickStart creates a 1 GMS + 1 CN + 1 DN + 1 CDC in total resources 4c8g for quick start.
	QuickStart modeName = "quick-start"
)
View Source
const (
	CN  nodeType = "CN"
	DN  nodeType = "DN"
	GMS nodeType = "GMS"
	CDC nodeType = "CDC"
)
View Source
const (
	RuleGuide1l2c = "zone-mode-1l2c"
	RuleGuide1l3c = "zone-mode-1l3c"
	RuleGuide2l3c = "zone-mode-2l3c"
	RuleGuide3l5c = "zone-mode-3l5c"
)
View Source
const DefaultPolarDBXClusterConfigMap = "default-polardbx-cluster-config"
View Source
const GigaByte int64 = 1024 * 1024 * 1024
View Source
const MegaByte int64 = 1024 * 1024
View Source
const RollingStrategyLabelName = "node-configuration"

RollingStrategyLabelName indicates the label name used to build node selectors for performance mode

Variables

View Source
var ErrInvalidModeGuide = errors.New("invalid name guide")
View Source
var ErrInvalidRuleGuide = errors.New("invalid rule guide")

Functions

func NewTopologyModeFactory

func NewTopologyModeFactory(rc *polardbxv1reconcile.Context) *topologyModeFactory

Types

type Handler

type Handler interface {
	Handle(rc *polardbxv1reconcile.Context, obj *polardbxv1.PolarDBXCluster) error
}

type RegionZones

type RegionZones struct {
	RegionLabel string
	Region      string
	ZoneLabel   string
	Zones       []string
}

type TopologyModeFactory

type TopologyModeFactory interface {
	// contains filtered or unexported methods
}

type TopologyRuleFactory

type TopologyRuleFactory interface {
	NewTopologyRules(TopologyRuleGuideMode, []RegionZones) (*polardbxv1polardbx.TopologyRules, error)
}

type TopologyRuleGuideMode

type TopologyRuleGuideMode string

Jump to

Keyboard shortcuts

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