rebalance

package
v0.0.0-...-0f49ba3 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAZToAnalyzers

func GetAZToAnalyzers(azAnalyzerConns []mysql.AZAnalyzerConnection, regionToAZLcuuids map[string][]string,
	ipToAnalyzer map[string]*mysql.Analyzer) map[string][]*mysql.Analyzer

Types

type AZInfo

type AZInfo struct {
	// contains filtered or unexported fields
}

type AnalyzerInfo

type AnalyzerInfo struct {
	// contains filtered or unexported fields
}

func NewAnalyzerInfo

func NewAnalyzerInfo() *AnalyzerInfo

func (*AnalyzerInfo) RebalanceAnalyzerByTraffic

func (r *AnalyzerInfo) RebalanceAnalyzerByTraffic(ifCheckout bool, dataDuration int) (*model.VTapRebalanceResult, error)

type ChangeInfo

type ChangeInfo struct {
	OldIP     string
	NewIP     string
	NewWeight float64
}

type DB

type DB interface {
	Get() error
}

//go:generate mockgen -source=analyzer.go -destination=./mocks/mock_analyzer.go -package=mocks DB

type DBInfo

type DBInfo struct {
	AZs             []mysql.AZ
	Analyzers       []mysql.Analyzer
	AZAnalyzerConns []mysql.AZAnalyzerConnection
	VTaps           []mysql.VTap

	// get query data
	Controllers       []mysql.Controller
	AZControllerConns []mysql.AZControllerConnection
}

func (*DBInfo) Get

func (r *DBInfo) Get() error

type Querier

type Querier interface {
	GetAgentDispatcher(domainPrefix string, dataDuration int) (map[string]int64, error)
}

//go:generate mockgen -source=query.go -destination=./mocks/mock_querier.go -package=mocks Querier

type Query

type Query struct{}

func (*Query) GetAgentDispatcher

func (q *Query) GetAgentDispatcher(domainPrefix string, dataDuration int) (map[string]int64, error)

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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