workstation

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigData

type ConfigData struct {
	User         string `yaml:"user"`
	IdentityFile string `yaml:"identity-file"`
}

type DBConnectInfo

type DBConnectInfo struct {
	DBHost     string `yaml:"Host"`
	DBPort     int    `yaml:"Port"`
	DBUser     string `yaml:"User"`
	DBPassword string `yaml:"Password"`
	ProjectID  string `yaml:"ProjectID"`
}

type DB_TYPE

type DB_TYPE string
const (
	DB_TYPE_AURORA    DB_TYPE = "aurora"
	DB_TYPE_TIDBCLOUD DB_TYPE = "tidbcloud"
	DB_TYPE_TIDB      DB_TYPE = "tidb"
)

type INC_AWS_ENV_FLAG

type INC_AWS_ENV_FLAG bool
const (
	INC_AWS_ENV INC_AWS_ENV_FLAG = true
	EXC_AWS_ENV INC_AWS_ENV_FLAG = false
)

type IS_ROOT_USER

type IS_ROOT_USER bool
const (
	ROOT_USER     IS_ROOT_USER = true
	NON_ROOT_USER IS_ROOT_USER = false
)

type RedshiftDBInfo

type RedshiftDBInfo struct {
	Host     string `yaml:"host"`
	Port     int32  `yaml:"port"`
	DBName   string `yaml:"db_name"`
	UserName string `yaml:"user_name"`
	Password string `yaml:"password"`
	Status   string
	NodeType string
}

type Workstation

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

Deploy Redshift Instance

func NewAWSWorkstation

func NewAWSWorkstation(localExe *ctxt.Executor, clusterName, clusterType, user, identityFile string, awsCliFlag INC_AWS_ENV_FLAG) (*Workstation, error)

func (*Workstation) DeployAuroraInfo

func (w *Workstation) DeployAuroraInfo(clusterType, clusterName, password string) error

func (*Workstation) DeployDMCluster

func (w *Workstation) DeployDMCluster(clusterName, clusterVersion string, mapDBInstances *map[string][]interface{}) error

func (*Workstation) DeployDMSource

func (w *Workstation) DeployDMSource(clusterName string, mapDBConnInfo *map[string]interface{}) error

func (*Workstation) DeployDMTask

func (w *Workstation) DeployDMTask(clusterName string, mapDBConnInfo *map[string]interface{}) error

func (*Workstation) DeployTiDBInfo

func (w *Workstation) DeployTiDBInfo(clusterName string) error

func (*Workstation) FormatDisk

func (w *Workstation) FormatDisk(targetIP, mountDir string) error

func (*Workstation) GetDMCluster

func (w *Workstation) GetDMCluster(clusterName string) (*map[string]interface{}, error)

*****************************************************************************

Target: Cluster info

func (*Workstation) GetDMMasterAddr

func (w *Workstation) GetDMMasterAddr(clusterName string) (*[]string, error)

func (*Workstation) GetDMSource

func (w *Workstation) GetDMSource(clusterName string) (*map[string]interface{}, error)

***************************************************************************

Target: DM Source

func (*Workstation) GetDMTask

func (w *Workstation) GetDMTask(clusterName string) (*map[string]interface{}, error)

func (*Workstation) GetExecutor

func (w *Workstation) GetExecutor() (*ctxt.Executor, error)

func (*Workstation) GetIPAddr

func (c *Workstation) GetIPAddr() string

func (*Workstation) GetRedshiftDBInfo

func (w *Workstation) GetRedshiftDBInfo() (*RedshiftDBInfo, error)

Todo: Remove it after ReadDBConnInfo migration

func (*Workstation) GetTiDBDBInfo

func (w *Workstation) GetTiDBDBInfo() (*DBConnectInfo, error)

Todo: Remove it after ReadDBConnInfo migration

func (*Workstation) InstallDumpling

func (w *Workstation) InstallDumpling(version string) error

func (*Workstation) InstallMySQLBinToWorker

func (w *Workstation) InstallMySQLBinToWorker(targetIP string) error

func (*Workstation) InstallMySQLShell

func (w *Workstation) InstallMySQLShell() error

func (*Workstation) InstallPackages

func (c *Workstation) InstallPackages(packages *[]string) error

Execute implements the Task interface

func (*Workstation) InstallProfiles

func (w *Workstation) InstallProfiles() error

func (*Workstation) InstallSyncDiffInspector

func (w *Workstation) InstallSyncDiffInspector(version string) error

func (*Workstation) InstallTiup

func (w *Workstation) InstallTiup() error

func (*Workstation) ParseYamlConfig

func (w *Workstation) ParseYamlConfig(yamlFile string, config interface{}) error

func (*Workstation) QueryTiDB

func (w *Workstation) QueryTiDB(dbName, query string) (*[]map[string]interface{}, error)

func (*Workstation) ReadDBConnInfo

func (w *Workstation) ReadDBConnInfo(dbType DB_TYPE) (*map[string]interface{}, error)

func (*Workstation) ReadMySQLBinPos

func (w *Workstation) ReadMySQLBinPos() (*[]map[string]interface{}, error)

func (*Workstation) ReadMySQLEarliestBinPos

func (w *Workstation) ReadMySQLEarliestBinPos() (*[]map[string]interface{}, error)

func (*Workstation) ReadTiDBCloudDBInfo

func (w *Workstation) ReadTiDBCloudDBInfo() (*DBConnectInfo, error)

Todo: Remove it after migration to ReadDBConnInfo

func (*Workstation) RunSerialCmds

func (w *Workstation) RunSerialCmds(cmds []string, isRootUser bool) error

func (*Workstation) RunSerialCmdsOnRemoteNode

func (w *Workstation) RunSerialCmdsOnRemoteNode(targetIP string, cmds []string, isRootUser bool) error

func (*Workstation) SyncDiffInspector

func (w *Workstation) SyncDiffInspector(clusterName, databases string) error

Jump to

Keyboard shortcuts

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