Documentation ¶
Index ¶
- Constants
- Variables
- func GetFailedDagLastLog(currentDag *DagDetailDTO) (res []string)
- type AdditionalDataDTO
- type AgentIdentity
- type AgentInfo
- type AgentInfoWithIdentity
- type AgentInstance
- type AgentRunStatus
- type AgentStatus
- type CdbObBackupTask
- type ClusterConfig
- type DagDetail
- type DagDetailDTO
- type GenericDTO
- type GitInfo
- type NodeDetail
- type NodeDetailDTO
- type ObInfoResp
- type ParameterInfo
- type RecycledTenantOverView
- type ResourcePoolInfo
- type ResourcePoolWithUnit
- type ResourceUnitConfig
- type RestoreInfo
- type RestoreOverview
- type Scope
- type ServerConfig
- type TaskDetail
- type TaskDetailDTO
- type TaskStatusDTO
- func (t *TaskStatusDTO) IsCancel() bool
- func (t *TaskStatusDTO) IsFailed() bool
- func (t *TaskStatusDTO) IsFinished() bool
- func (t *TaskStatusDTO) IsPass() bool
- func (t *TaskStatusDTO) IsPending() bool
- func (t *TaskStatusDTO) IsReady() bool
- func (t *TaskStatusDTO) IsRetry() bool
- func (t *TaskStatusDTO) IsRollback() bool
- func (t *TaskStatusDTO) IsRun() bool
- func (t *TaskStatusDTO) IsRunning() bool
- func (t *TaskStatusDTO) IsSucceed() bool
- type TenantInfo
- type TenantOverview
- type VariableInfo
Constants ¶
View Source
const ( RUN = iota + 1 RETRY ROLLBACK CANCEL PASS RUN_STR = "RUN" RETRY_STR = "RETRY" ROLLBACK_STR = "ROLLBACK" CANCEL_STR = "CANCEL" PASS_STR = "PASS" )
View Source
const ( PENDING = iota + 1 READY RUNNING FAILED SUCCEED PENDING_STR = "PENDING" READY_STR = "READY" RUNNING_STR = "RUNNING" FAILED_STR = "FAILED" SUCCEED_STR = "SUCCEED" )
State
View Source
const ( TASK_NAME_UPDATE_CONFIG = "Update cluster config" TASK_NAME_UPDATE_OB_CONFIG = "Update observer config" DAG_INIT_CLUSTER = "Initialize cluster" DAG_JOIN_TO_MASTER = "Join to master" DAG_JOIN_SELF = "Join self" )
Variables ¶
View Source
var OPERATOR_MAP = map[int]string{ RUN: RUN_STR, RETRY: RETRY_STR, ROLLBACK: ROLLBACK_STR, CANCEL: CANCEL_STR, PASS: PASS_STR, }
View Source
var STATE_MAP = map[int]string{ PENDING: PENDING_STR, READY: READY_STR, RUNNING: RUNNING_STR, FAILED: FAILED_STR, SUCCEED: SUCCEED_STR, }
Functions ¶
func GetFailedDagLastLog ¶
func GetFailedDagLastLog(currentDag *DagDetailDTO) (res []string)
Types ¶
type AdditionalDataDTO ¶
type AgentIdentity ¶
type AgentIdentity string
const ( MASTER AgentIdentity = "MASTER" FOLLOWER AgentIdentity = "FOLLOWER" SINGLE AgentIdentity = "SINGLE" CLUSTER_AGENT AgentIdentity = "CLUSTER AGENT" TAKE_OVER_MASTER AgentIdentity = "TAKE OVER MASTER" TAKE_OVER_FOLLOWER AgentIdentity = "TAKE OVER FOLLOWER" SCALING_OUT AgentIdentity = "SCALING OUT" UNIDENTIFIED AgentIdentity = "UNIDENTIFIED" )
type AgentInfo ¶
type AgentInfoWithIdentity ¶
type AgentInfoWithIdentity struct { AgentInfo Identity AgentIdentity `json:"identity" binding:"required"` }
type AgentInstance ¶
type AgentInstance struct { AgentInfo Zone string `json:"zone" binding:"required"` Identity AgentIdentity `json:"identity" binding:"required"` Version string `json:"version"` }
type AgentRunStatus ¶
type AgentStatus ¶
type AgentStatus struct { Agent AgentInfoWithIdentity `json:"agent"` // service state State int32 `json:"state"` // service version Version string `json:"version"` // service pid Pid int `json:"pid"` // timestamp when service started StartAt int64 `json:"startAt"` // Ports process occupied ports OBState int `json:"obState"` UnderMaintenance bool `json:"underMaintenance"` }
type CdbObBackupTask ¶
type CdbObBackupTask struct { TenantID int64 `json:"tenant_id"` TaskID int64 `json:"task_id"` JobID int64 `json:"job_id"` Incarnation int64 `json:"incarnation"` BackupSetID int64 `json:"backup_set_id"` StartTimestamp time.Time `json:"start_timestamp"` EndTimestamp time.Time `json:"end_timestamp"` Status string `json:"status"` StartScn int64 `json:"start_scn"` EndScn int64 `json:"end_scn"` UserLsStartScn int64 `json:"user_ls_start_scn"` EncryptionMode string `json:"encryption_mode"` InputBytes int64 `json:"input_bytes"` OutputBytes int64 `json:"output_bytes"` OutputRateBytes float64 `json:"output_rate_bytes"` ExtraMetaBytes int64 `json:"extra_meta_bytes"` TabletCount int64 `json:"tablet_count"` FinishTabletCount int64 `json:"finish_tablet_count"` MacroBlockCount int64 `json:"macro_block_count"` FinishMacroBlockCount int64 `json:"finish_macro_block_count"` FileCount int64 `json:"file_count"` MetaTurnID int64 `json:"meta_turn_id"` DataTurnID int64 `json:"data_turn_id"` Result int64 `json:"result"` Comment string `json:"comment"` Path string `json:"path"` }
type ClusterConfig ¶
type ClusterConfig struct { ClusterID int `json:"id"` ClusterName string `json:"name"` Version string `json:"version"` ZoneConfig map[string][]*ServerConfig `json:"topology"` }
type DagDetail ¶
type DagDetail struct { DagID int64 `json:"dag_id" uri:"dag_id"` Name string `json:"name"` Stage int `json:"stage"` MaxStage int `json:"max_stage"` TaskStatusDTO AdditionalDataDTO Nodes []*NodeDetailDTO `json:"nodes"` }
type DagDetailDTO ¶
type DagDetailDTO struct { *GenericDTO *DagDetail }
type GenericDTO ¶
type GenericDTO struct {
GenericID string `json:"id" uri:"id" binding:"required"`
}
type NodeDetail ¶
type NodeDetail struct { NodeID int64 `json:"node_id" uri:"node_id"` Name string `json:"name"` TaskStatusDTO AdditionalDataDTO SubTasks []*TaskDetailDTO `json:"sub_tasks"` }
type NodeDetailDTO ¶
type NodeDetailDTO struct { *GenericDTO *NodeDetail }
type ObInfoResp ¶
type ObInfoResp struct { Agents []AgentInstance `json:"agent_info"` Config ClusterConfig `json:"obcluster_info"` }
type ParameterInfo ¶
type RecycledTenantOverView ¶
type ResourcePoolInfo ¶
type ResourcePoolWithUnit ¶
type ResourcePoolWithUnit struct { Name string `json:"pool_name"` Id int `json:"pool_id"` ZoneList string `json:"zone_list"` UnitNum int `json:"unit_num"` Unit *ResourceUnitConfig `json:"unit_config"` }
type ResourceUnitConfig ¶
type ResourceUnitConfig struct { GmtCreate time.Time `json:"create_time"` GmtModified time.Time `json:"modify_time"` UnitConfigId int `json:"unit_config_id"` Name string `json:"name"` MaxCpu float64 `json:"max_cpu"` MinCpu float64 `json:"min_cpu"` MemorySize int `json:"memory_size"` LogDiskSize int `json:"log_disk_size"` MaxIops int `json:"max_iops"` MinIops int `json:"min_iops"` }
type RestoreInfo ¶
type RestoreInfo struct { TenantId int64 `json:"tenant_id"` JobID int64 `json:"job_id"` RestoreTenantName string `json:"restore_tenant_name"` RestoreTenantId int64 `json:"restore_tenant_id"` BackupTenantName string `json:"backup_tenant_name"` BackupTenantId int64 `json:"backup_tenant_id"` BackupClusterName string `json:"backup_cluster_name"` BackupDest string `json:"backup_dest"` RestoreOption string `json:"restore_option"` RestoreScn int64 `json:"restore_scn"` RestoreScnDisplay string `json:"restore_scn_display"` Status string `json:"status"` StartTimestamp string `json:"start_timestamp"` BackupSetList string `json:"backup_set_list"` BackupPieceList string `json:"backup_piece_list"` TabletCount int64 `json:"tablet_count"` TotalBytes int64 `json:"total_bytes"` Description string `json:"description"` FinishTabletCount int64 `json:"finish_tablet_count"` FinishBytes int64 `json:"finish_bytes"` FinishBytesDisplay string `json:"finish_bytes_display"` TotalBytesDisplay string `json:"total_bytes_display"` }
type RestoreOverview ¶
type RestoreOverview struct { RestoreInfo RecoverScn int64 `json:"recover_scn"` RecoverScnDisplay string `json:"recover_scn_display"` RecoverProgress string `json:"recover_progress"` RestoreProgress string `json:"restore_progress"` BackupClusterVersion int `json:"backup_cluster_version"` LsCount int `json:"ls_count"` FinishLsCount int `json:"finish_ls_count"` Comment string `json:"comment"` FinishTimestamp string `json:"finish_timestamp"` }
type ServerConfig ¶
type TaskDetail ¶
type TaskDetail struct { TaskID int64 `json:"task_id" uri:"task_id"` Name string `json:"name"` TaskStatusDTO AdditionalDataDTO ExecuteTimes int `json:"execute_times"` ExecuteAgent AgentInfo `json:"execute_agent"` TaskLogs []string `json:"task_logs"` }
type TaskDetailDTO ¶
type TaskDetailDTO struct { *GenericDTO *TaskDetail }
type TaskStatusDTO ¶
type TaskStatusDTO struct { State string `json:"state"` Operator string `json:"operator"` StartTime time.Time `json:"start_time"` EndTime time.Time `json:"end_time"` }
func (*TaskStatusDTO) IsCancel ¶
func (t *TaskStatusDTO) IsCancel() bool
func (*TaskStatusDTO) IsFailed ¶
func (t *TaskStatusDTO) IsFailed() bool
func (*TaskStatusDTO) IsFinished ¶
func (t *TaskStatusDTO) IsFinished() bool
func (*TaskStatusDTO) IsPass ¶
func (t *TaskStatusDTO) IsPass() bool
func (*TaskStatusDTO) IsPending ¶
func (t *TaskStatusDTO) IsPending() bool
func (*TaskStatusDTO) IsReady ¶
func (t *TaskStatusDTO) IsReady() bool
func (*TaskStatusDTO) IsRetry ¶
func (t *TaskStatusDTO) IsRetry() bool
func (*TaskStatusDTO) IsRollback ¶
func (t *TaskStatusDTO) IsRollback() bool
func (*TaskStatusDTO) IsRun ¶
func (t *TaskStatusDTO) IsRun() bool
func (*TaskStatusDTO) IsRunning ¶
func (t *TaskStatusDTO) IsRunning() bool
func (*TaskStatusDTO) IsSucceed ¶
func (t *TaskStatusDTO) IsSucceed() bool
type TenantInfo ¶
type TenantInfo struct { TenantOverview Charset string `json:"charset"` // Only for ORACLE tenant Collation string `json:"collation"` // Only for ORACLE tenant WhiteList string `json:"whitelist"` Pools []*ResourcePoolWithUnit `json:"pools"` }
type TenantOverview ¶
type TenantOverview struct { Name string `json:"tenant_name"` Id int `json:"tenant_id"` CreatedTime time.Time `json:"created_time"` Mode string `json:"mode"` Status string `json:"status"` Locked string `json:"locked"` PrimaryZone string `json:"primary_zone"` Locality string `json:"locality"` InRecyclebin string `json:"in_recyclebin"` }
type VariableInfo ¶
Click to show internal directories.
Click to hide internal directories.