fixture

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: Apache-2.0 Imports: 11 Imported by: 28

Documentation

Index

Constants

View Source
const (
	// StorageTypeLocal ...
	StorageTypeLocal StorageType = "local"
	// StorageTypeRemote ...
	StorageTypeRemote StorageType = "remote"
	// CPU ...
	CPU = corev1.ResourceCPU
	// Memory ...
	Memory = corev1.ResourceMemory
	// Storage ...
	Storage = corev1.ResourceStorage
)

Variables

View Source
var (
	// BuildTS ...
	BuildTS = "None"
	// BuildHash ...
	BuildHash = "None"
)
View Source
var (
	// BestEffort ...
	BestEffort = corev1.ResourceRequirements{}
	// Small ...
	Small = corev1.ResourceRequirements{
		Limits: corev1.ResourceList{
			CPU:    resource.MustParse("1000m"),
			Memory: resource.MustParse("1Gi"),
		},
		Requests: corev1.ResourceList{
			CPU:    resource.MustParse("1000m"),
			Memory: resource.MustParse("1Gi"),
		},
	}
	// Medium ...
	Medium = corev1.ResourceRequirements{
		Requests: corev1.ResourceList{
			CPU:    resource.MustParse("2000m"),
			Memory: resource.MustParse("4Gi"),
		},
		Limits: corev1.ResourceList{
			CPU:    resource.MustParse("2000m"),
			Memory: resource.MustParse("4Gi"),
		},
	}
	// Large ...
	Large = corev1.ResourceRequirements{
		Requests: corev1.ResourceList{
			CPU:    resource.MustParse("4000m"),
			Memory: resource.MustParse("4Gi"),
		},
		Limits: corev1.ResourceList{
			CPU:    resource.MustParse("4000m"),
			Memory: resource.MustParse("16Gi"),
		},
	}
	// XLarge ...
	XLarge = corev1.ResourceRequirements{
		Requests: corev1.ResourceList{
			CPU:    resource.MustParse("8000m"),
			Memory: resource.MustParse("16Gi"),
		},
		Limits: corev1.ResourceList{
			CPU:    resource.MustParse("8000m"),
			Memory: resource.MustParse("16Gi"),
		},
	}
)
View Source
var Context fixtureContext

Context ...

Functions

func BuildGenericKubeClient

func BuildGenericKubeClient(conf *rest.Config) (client.Client, error)

BuildGenericKubeClient builds kube client

func StorageClass

func StorageClass(t StorageType) string

StorageClass ...

func WithStorage

WithStorage ...

Types

type ABTestConfig

type ABTestConfig struct {
	ClusterBConfig TiDBClusterConfig
	LogPath        string
	Concurrency    int
	GeneralLog     bool
}

ABTestConfig for abtest component

type BinlogConfig

type BinlogConfig struct {
	Image          string
	EnableRelayLog bool
	SyncTimeout    time.Duration
}

BinlogConfig for binlog component

type CDCConfig

type CDCConfig struct {
	Image              string
	LogPath            string
	EnableKafka        bool
	KafkaConsumerImage string
	LogLevel           string
	Timezone           string
	SortEngine         string
	SortDir            string
}

CDCConfig for binlog component

type DMConfig

type DMConfig struct {
	MySQLConf     MySQLConfig // all MySQL instances use the same config now.
	DMVersion     string
	MasterReplica int // replicas of DM-master
	WorkerReplica int // replicas of DM-worker
	LogPath       string
}

DMConfig is the configuration for DM (Data Migration) component.

type MatrixConfig

type MatrixConfig struct {
	MatrixConfigFile string
	MatrixTiDBConfig string
	MatrixTiKVConfig string
	MatrixPDConfig   string
	MatrixSQLConfig  fileArrayFlags
	NoCleanup        bool
}

MatrixConfig for matrix component

type MySQLConfig

type MySQLConfig struct {
	Version      string
	StorageSize  string
	EnableBinlog bool
	EnableGTID   bool
}

MySQLConfig is the configuration for a MySQL component.

type StorageType

type StorageType string

StorageType ...

type TiDBClusterConfig

type TiDBClusterConfig struct {
	// hub address
	TiDBHubAddress    string
	TiKVHubAddress    string
	PDHubAddress      string
	TiFlashHubAddress string

	// image versions
	ImageVersion string
	TiDBImage    string
	TiKVImage    string
	PDImage      string
	TiFlashImage string

	// configurations
	TiDBConfig string
	TiKVConfig string
	PDConfig   string

	// replicas
	TiDBReplicas    int
	TiKVReplicas    int
	PDReplicas      int
	TiFlashReplicas int

	// Database address
	TiDBAddr addressArrayFlags
	TiKVAddr addressArrayFlags
	PDAddr   addressArrayFlags

	MatrixConfig MatrixConfig
}

TiDBClusterConfig ...

type TiFlashConfig

type TiFlashConfig struct {
	LogPath string
}

TiFlashConfig for TiFlash component

Jump to

Keyboard shortcuts

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