Documentation
¶
Index ¶
- Constants
- Variables
- func AsyncCheckAndStartDaemon(needBeCluster ...bool) (<-chan int32, <-chan error)
- func CheckAllAgentMaintenance() error
- func CheckAndStartDaemon(needBeCluster ...bool) error
- func CheckIdentityForUpgrade() error
- func ConfirmBackup() error
- func GetTargetBuildVersion(pkgs map[string]*rpm.Package) (targetBuildVersion string, err error)
- func GetTargetBuildVersionByVersion(version string, pkgs map[string]*rpm.Package) (targetBuildVersion string, err error)
- func NewAgentByString(str string) (*meta.AgentInfo, error)
- func NewClusterCmd() *cobra.Command
- func NewScaleInCmd() *cobra.Command
- func NewScaleOutCmd() *cobra.Command
- func UploadPkgsByNameAndVersionInDir(pkgDir string, pkgs map[string]*rpm.Package, ...) (err error)
- type AgentJoinFlags
- type AgentRemoveFlags
- type BaseBackupConfigFlags
- type ClusterBackupFlags
- type ClusterInitFlags
- type ClusterScaleInFlags
- type ClusterScaleOutFlags
- type ClusterShowFlags
- type ClusterStartFlags
- type ClusterStopFlags
- type ObserverConfigFlags
- type SSHFlags
Constants ¶
View Source
const ( // CMD_JOIN represents the "join" command. CMD_JOIN = "join" // Flags for the "join" command. FLAG_MYSQL_PORT = "mysql_port" FLAG_MYSQL_PORT_SH = "p" FLAG_RPC_PORT = "rpc_port" FLAG_RPC_PORT_SH = "P" FLAG_DATA_DIR = "data_dir" FLAG_DATA_DIR_SH = "d" FLAG_REDO_DIR = "redo_dir" FLAG_REDO_DIR_SH = "r" FLAG_OPT_STR = "opt_str" FLAG_OPT_STR_SH = "o" FLAG_LOG_LEVEL = "log_level" FLAG_LOG_LEVEL_SH = "l" // CMD_REMOVE represents the "remove" command used to remove an obshell agent. CMD_REMOVE = "remove" // CMD_INIT represents the "init" command used to initialize the cluster. CMD_INIT = "init" // Flags for the "init" command. FLAG_PASSWORD = "rootpassword" FLAG_PASSWORD_ALIAS = "rp" FLAG_CLUSTER_NAME = "cluster_name" FLAG_CLUSTER_NAME_SH = "n" FLAG_CLUSTER_ID = "cluster_id" FLAG_CLUSTER_ID_SH = "i" FLAG_RS_LIST = "rs_list" FLAG_RS_LIST_ALIAS = "rs" FLAG_IMPORT_SCRIPT = "import_script" // CMD_START represents the "start" command used to start observers. CMD_START = "start" // Flags for the "start" command. FLAG_SERVER = "server" FLAG_SERVER_SH = "s" FLAG_ZONE = "zone" FLAG_ZONE_SH = "z" FLAG_ID = "id" FLAG_ID_SH = "i" FLAG_ALL = "all" FLAG_ALL_SH = "a" // Flags for SSH configuration. FLAG_SSH_USER = "ssh_user" FLAG_SSH_PORT = "ssh_port" FLAG_SSH_KEY_FILE = "key_file" FLAG_SSH_KEY_PASSPHRASE = "key_passphrase" FLAG_USER_PASSWORD = "user_password" // CMD_STOP represents the "stop" command used to stop observers. CMD_STOP = "stop" // Flags for the "stop" command. FLAG_FORCE = "force" FLAG_FORCE_SH = "f" FLAG_TERMINATE = "terminate" FLAG_TERMINATE_SH = "t" FLAG_IMMEDIATE = "immediate" FLAG_IMMEDIATE_SH = "I" // CMD_SCALE_OUT represents the "scale-out" command. CMD_SCALE_OUT = "scale-out" // CMD_SCALE_IN represents the "scale-in" command. CMD_SCALE_IN = "scale-in" // CMD_UPGRADE represents the "upgrade" command for upgrading the cluster. CMD_UPGRADE = "upgrade" // Flags for the "upgrade" command. FLAG_PKG_DIR = "pkg_directory" FLAG_PKG_DIR_SH = "d" FLAG_VERSION = "target_version" FLAG_VERSION_SH = "V" FLAG_MODE = "mode" FLAG_MODE_SH = "m" FLAG_UPGRADE_DIR = "tmp_directory" FLAG_UPGRADE_DIR_SH = "t" // CMD_SHOW represents the "show" command used to display information about the cluster status. CMD_SHOW = "show" // CMD_BACKUP represents the "backup" command used to backup the cluster. CMD_BACKUP = "backup" // Flags for the "backup" command. FLAG_PATH = "backup_base_uri" FLAG_PATH_SH = "u" FLAG_BACKUP_MODE = "backup_mode" FLAG_BACKUP_MODE_SH = "m" FLAG_LOG_ARCHIVE_CONCURRENCY = "log_archive_concurrency" FLAG_LOG_ARCHIVE_CONCURRENCY_SH = "c" FLAG_BINDING = "binding" FLAG_BINDING_SH = "b" FLAG_ENCRYPTION = "encryption" FLAG_ENCRYPTION_SH = "e" FLAG_HA_LOW_THREAD_SCORE = "ha_low_thread_score" FLAG_HA_LOW_THREAD_SCORE_SH = "s" FLAG_PIECE_SWITCH_INTERVAL = "piece_switch_interval" FLAG_PIECE_SWITCH_INTERVAL_SH = "i" FLAG_DELETE_POLICY = "delete_policy" FLAG_DELETE_POLICY_SH = "D" FLAG_RECOVERY_WINDOW = "delete_recovery_window" FLAG_RECOVERY_WINDOW_SH = "r" FLAG_ARCHIVE_LAG_TARGET = "archive_lag_target" FLAG_ARCHIVE_LAG_TARGET_SH = "l" FLAG_PLUS_ARCHIVE = "plus_archive" FLAG_PLUS_ARCHIVE_SH = "P" )
Variables ¶
View Source
var ( CLUSTER_CMD = fmt.Sprintf("%s %s", agentconst.PROC_OBSHELL, clientconst.CMD_CLUSTER) CLUSTER_CMD_TEMPLATE = CLUSTER_CMD + " %s [flags]" )
View Source
var LOGLEVEL = []string{"DEBUG", "TRACE", "WDIAG", "EDIAG", "INFO", "WARN", "ERROR"}
Functions ¶
func CheckAllAgentMaintenance ¶
func CheckAllAgentMaintenance() error
func CheckAndStartDaemon ¶
func CheckIdentityForUpgrade ¶
func CheckIdentityForUpgrade() error
func ConfirmBackup ¶
func ConfirmBackup() error
func GetTargetBuildVersion ¶
func NewClusterCmd ¶
func NewScaleInCmd ¶
func NewScaleOutCmd ¶
Types ¶
type AgentJoinFlags ¶
type AgentJoinFlags struct { ObserverConfigFlags // contains filtered or unexported fields }
type AgentRemoveFlags ¶
type AgentRemoveFlags struct {
// contains filtered or unexported fields
}
type BaseBackupConfigFlags ¶
type BaseBackupConfigFlags struct { Location string Binding string PieceSwitchInterval string LogArchiveConcurrency string ArchiveLagTarget string Encryption string HaLowThreadScore string Policy string RecoveryWindow string Mode string PlusArchive bool }
func (*BaseBackupConfigFlags) NewBackupConfigParam ¶
func (f *BaseBackupConfigFlags) NewBackupConfigParam() (*param.BackupConfigParam, error)
func (*BaseBackupConfigFlags) NewBackupParam ¶
func (f *BaseBackupConfigFlags) NewBackupParam() *param.BackupParam
type ClusterBackupFlags ¶
type ClusterBackupFlags struct { BackupBaseUri string BaseBackupConfigFlags Verbose bool SkipConfirm bool }
func (*ClusterBackupFlags) ToClusterBackupConfigParam ¶
func (f *ClusterBackupFlags) ToClusterBackupConfigParam() (*param.ClusterBackupConfigParam, error)
type ClusterInitFlags ¶
type ClusterInitFlags struct { ObserverConfigFlags // contains filtered or unexported fields }
type ClusterScaleInFlags ¶
type ClusterScaleOutFlags ¶
type ClusterScaleOutFlags struct { ObserverConfigFlags // contains filtered or unexported fields }
type ClusterShowFlags ¶
type ClusterShowFlags struct {
// contains filtered or unexported fields
}
type ClusterStartFlags ¶
type ClusterStartFlags struct { SSHFlags // contains filtered or unexported fields }
type ClusterStopFlags ¶
type ClusterStopFlags struct {
// contains filtered or unexported fields
}
type ObserverConfigFlags ¶
type ObserverConfigFlags struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.