param

package
v0.0.0-...-fee78ac Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllAgentsSyncData

type AllAgentsSyncData struct {
	Maintainer   meta.AgentInfo       `json:"maintainer" binding:"required"`
	AllAgents    []oceanbase.AllAgent `json:"all_agents" binding:"required"`
	LastSyncTime time.Time            `json:"last_sync_time" binding:"required"`
}

type ArchiveLogStatusParam

type ArchiveLogStatusParam struct {
	Status *string `json:"status"`
}

func (*ArchiveLogStatusParam) Check

func (p *ArchiveLogStatusParam) Check() error

func (*ArchiveLogStatusParam) Format

func (p *ArchiveLogStatusParam) Format()

type BackupConf

type BackupConf struct {
	BackupConfigParam

	ArchiveDest *DestConf
	DataDest    *DestConf
}

type BackupConfigParam

type BackupConfigParam struct {
	BackupBaseUri  *string
	ArchiveBaseUri *string
	DataBaseUri    *string

	LogArchiveDestConf
	BaseBackupConfigParam
}

func NewBackupConfigParamForCluster

func NewBackupConfigParamForCluster(p *ClusterBackupConfigParam) *BackupConfigParam

func NewBackupConfigParamForTenant

func NewBackupConfigParamForTenant(p *TenantBackupConfigParam) *BackupConfigParam

func (*BackupConfigParam) Check

func (p *BackupConfigParam) Check() (backupConf *BackupConf, err error)

func (*BackupConfigParam) Format

func (p *BackupConfigParam) Format()

type BackupDeletePolicy

type BackupDeletePolicy struct {
	Policy         string `json:"policy"`
	RecoveryWindow string `json:"recovery_window"`
}

type BackupOverview

type BackupOverview struct {
	Statuses []oceanbase.CdbObBackupTask `json:"statuses"`
}

type BackupParam

type BackupParam struct {
	Mode        *string `json:"mode"`
	Encryption  *string `json:"encryption"`
	PlusArchive *bool   `json:"plus_archive"`
}

func (*BackupParam) Check

func (p *BackupParam) Check() error

func (*BackupParam) Format

func (p *BackupParam) Format()

type BackupStatusParam

type BackupStatusParam struct {
	Status *string `json:"status"`
}

func (*BackupStatusParam) Check

func (p *BackupStatusParam) Check() error

func (*BackupStatusParam) Format

func (p *BackupStatusParam) Format()

type BaseBackupConfigParam

type BaseBackupConfigParam struct {
	LogArchiveConcurrency *int                `json:"log_archive_concurrency"`
	ArchiveLagTarget      *string             `json:"archive_lag_target"`
	HaLowThreadScore      *int                `json:"ha_low_thread_score"`
	DeletePolicy          *BackupDeletePolicy `json:"delete_policy"`
}

type ClusterBackupConfigParam

type ClusterBackupConfigParam struct {
	BackupBaseUri *string `json:"backup_base_uri"`
	LogArchiveDestConf
	BaseBackupConfigParam
}

type ClusterConfig

type ClusterConfig struct {
	ClusterID   int                        `json:"id"`
	ClusterName string                     `json:"name"`
	Version     string                     `json:"version"`
	ZoneConfig  map[string][]*ServerConfig `json:"topology"`
}

type ClusterScaleInParam

type ClusterScaleInParam struct {
	AgentInfo meta.AgentInfo `json:"agent_info" binding:"required"`
	ForceKill bool           `json:"force_kill"` // default to false
}

type ClusterScaleOutParam

type ClusterScaleOutParam struct {
	ScaleOutParam
}

type CreateResourcePoolTaskParam

type CreateResourcePoolTaskParam struct {
	PoolName       string
	ZoneName       string // a resource pool is bound to a zone.
	UnitConfigName string
	UnitNum        int
}

Task Param

type CreateResourceUnitConfigParams

type CreateResourceUnitConfigParams struct {
	Name        *string  `json:"name" binding:"required"`        // unit config name
	MemorySize  *string  `json:"memory_size" binding:"required"` // memory size, greater than or equal to '1G'
	MaxCpu      *float64 `json:"max_cpu" binding:"required"`     // max cpu cores, greater than 0
	MinCpu      *float64 `json:"min_cpu"`                        // min cpu cores, smaller than or equal 'max_cpu_cores'
	MaxIops     *int     `json:"max_iops"`                       // max iops, greater than or equal to 1024
	MinIops     *int     `json:"min_iops"`                       // min iops, smaller than or equal to 'max_iops'
	LogDiskSize *string  `json:"log_disk_size"`                  // log disk size, greater than or equal to '2G'
}

type CreateTenantParam

type CreateTenantParam struct {
	Name         *string                `json:"name" binding:"required"`      // Tenant name.
	ZoneList     []ZoneParam            `json:"zone_list" binding:"required"` // Tenant zone list with unit config.
	Mode         string                 `json:"mode"`                         // Tenant mode, "MYSQL"(default) or "ORACLE".
	PrimaryZone  string                 `json:"primary_zone"`                 // Tenant primary_zone.
	Whitelist    *string                `json:"whitelist"`                    // Tenant whitelist.
	RootPassword string                 `json:"root_password"`                // Root password.
	Charset      string                 `json:"charset"`
	Collation    string                 `json:"collation"`
	ReadOnly     bool                   `json:"read_only"`     // Default to false.
	Comment      string                 `json:"comment"`       // Messages.
	Variables    map[string]interface{} `json:"variables"`     // Teantn global variables.
	Parameters   map[string]interface{} `json:"parameters"`    // Tenant parameters.
	Scenario     string                 `json:"scenario"`      // Tenant scenario.
	ImportScript bool                   `json:"import_script"` // whether to import script.
	TimeZone     string                 `json:"-"`
}

type DeployTaskParams

type DeployTaskParams struct {
	Dirs map[string]string `json:"dirs" binding:"required"`
}

type DestConf

type DestConf struct {
	BaseURI     string
	StorageType string
	JoinedDir   string
}

type DropTenantParam

type DropTenantParam struct {
	Name        string `json:"-"`            // Tenant name will be ignored in request body.
	NeedRecycle *bool  `json:"need_recycle"` // Whether to recycle tenant(can be flashback).
}

type FlashBackTenantParam

type FlashBackTenantParam struct {
	NewName *string `json:"new_name"`
}

type ForcePassDagParam

type ForcePassDagParam struct {
	ID []string `json:"id"`
}

type JoinApiParam

type JoinApiParam struct {
	AgentInfo meta.AgentInfo `json:"agentInfo" binding:"required"`
	ZoneName  string         `json:"zoneName" binding:"required"`
}

type JoinMasterParam

type JoinMasterParam struct {
	JoinApiParam JoinApiParam `json:"joinApiParam" binding:"required"`
	HomePath     string       `json:"home_path" binding:"required"`
	Version      string       `json:"version" binding:"required"`
	Os           string       `json:"os" binding:"required"`
	Architecture string       `json:"architecture" binding:"required"`
	PublicKey    string       `json:"public_key" binding:"required"`
	Token        string       `json:"token" binding:"required"`
}

type LocalScaleOutParam

type LocalScaleOutParam struct {
	ScaleOutParam
	TargetVersion                string            `json:"targetVersion"`
	AllAgents                    []meta.AgentInfo  `json:"allAgents" binding:"required"`
	Dirs                         map[string]string `json:"dirs" binding:"required"`
	CoordinateDagId              string            `json:"coordinateDagId" binding:"required"`
	RootPwd                      string            `json:"rootPwd" binding:"required"`
	Uuid                         string            `json:"uuid" binding:"required"`
	ParamExpectDeployNextStage   int               `json:"paramExpectDeployNextStage" binding:"required"`
	ParamExpectStartNextStage    int               `json:"paramExpectStartNextStage" binding:"required"`
	ParamExpectRollbackNextStage int               `json:"paramExpectRollbackNextStage" binding:"required"`
}

type LogArchiveDestConf

type LogArchiveDestConf struct {
	Location            *string
	Binding             *string `json:"binding"`
	PieceSwitchInterval *string `json:"piece_switch_interval"`
}

type ModifyReplicaZoneParam

type ModifyReplicaZoneParam struct {
	Name           string  `json:"zone_name" binding:"required"`
	ReplicaType    *string `json:"replica_type"` // Replica type, "FULL"(default) or "READONLY".
	UnitConfigName *string `json:"unit_config_name"`
	UnitNum        *int    `json:"unit_num"`
}

type ModifyReplicasParam

type ModifyReplicasParam struct {
	ZoneList []ModifyReplicaZoneParam `json:"zone_list" binding:"required"` // Tenant zone list with unit config.
}

type ModifyTenantPrimaryZoneParam

type ModifyTenantPrimaryZoneParam struct {
	PrimaryZone *string `json:"primary_zone" binding:"required"`
}

type ModifyTenantRootPasswordParam

type ModifyTenantRootPasswordParam struct {
	OldPwd string  `json:"old_password"`
	NewPwd *string `json:"new_password" binding:"required"`
}

type ModifyTenantWhitelistParam

type ModifyTenantWhitelistParam struct {
	Whitelist *string `json:"whitelist" binding:"required"`
}

type ObClusterConfigParams

type ObClusterConfigParams struct {
	ClusterId   *int    `json:"clusterId"`
	ClusterName *string `json:"clusterName"`
	RsList      *string `json:"rsList"`
	RootPwd     *string `json:"rootPwd"`
}

type ObInfoResp

type ObInfoResp struct {
	Agents []meta.AgentInstance `json:"agent_info"`
	Config ClusterConfig        `json:"obcluster_info"`
}

ObInfoResp is the response of ob/info

type ObInitParam

type ObInitParam struct {
	ImportScript bool `json:"import_script"`
}

type ObServerConfigParams

type ObServerConfigParams struct {
	ObServerConfig map[string]string `json:"observerConfig" binding:"required"`
	Restart        bool              `json:"restart"`
	Scope          Scope             `json:"scope" binding:"required"`
}

type ObStopParam

type ObStopParam struct {
	Scope             Scope             `json:"scope" binding:"required"`
	Force             bool              `json:"force"`
	Terminate         bool              `json:"terminate"`
	ForcePassDagParam ForcePassDagParam `json:"forcePassDag"`
}

type ObUpgradeParam

type ObUpgradeParam struct {
	UpgradeCheckParam
	Mode string `json:"mode" binding:"required"`
}

type PoolParam

type PoolParam struct {
	UnitConfigName string `json:"unit_config_name" binding:"required"`
	UnitNum        int    `json:"unit_num" binding:"required"`
}

type RenameTenantParam

type RenameTenantParam struct {
	Name    string  `json:"-"`                           // Tenant name will be ignored in request body.
	NewName *string `json:"new_name" binding:"required"` // New tenant name.
}

type RestoreOverview

type RestoreOverview struct {
	bo.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 RestoreParam

type RestoreParam struct {
	RestoreWindowsParam

	TenantName string `json:"restore_tenant_name" binding:"required"`

	Timestamp *time.Time `json:"timestamp" time_format:"2006-01-02T15:04:05.000Z07:00"`
	SCN       *int64     `json:"scn"`

	ZoneList          []ZoneParam `json:"zone_list" binding:"required"` // Tenant zone list with unit config.
	PrimaryZone       *string     `json:"primary_zone"`
	Concurrency       *int        `json:"concurrency"`
	HaHighThreadScore *int        `json:"ha_high_thread_score"`
	Decryption        *[]string   `json:"decryption"`

	KmsEncryptInfo *string `json:"kms_encrypt_info"`
}

func (*RestoreParam) Check

func (p *RestoreParam) Check() error

func (*RestoreParam) Format

func (p *RestoreParam) Format()

type RestoreParams

type RestoreParams struct {
	Params []oceanbase.ObParameters `json:"params" binding:"required"`
}

type RestoreWindowsParam

type RestoreWindowsParam struct {
	DataBackupUri string  `json:"data_backup_uri" binding:"required"`
	ArchiveLogUri *string `json:"archive_log_uri"`
}

type ScaleInTenantReplicasParam

type ScaleInTenantReplicasParam struct {
	Zones []string `json:"zones" binding:"required"`
}

type ScaleOutParam

type ScaleOutParam struct {
	AgentInfo meta.AgentInfo    `json:"agentInfo" binding:"required"`
	ObConfigs map[string]string `json:"obConfigs" binding:"required"`
	Zone      string            `json:"zone" binding:"required"`
}

type ScaleOutTenantReplicasParam

type ScaleOutTenantReplicasParam struct {
	ZoneList []ZoneParam `json:"zone_list" binding:"required"` // Tenant zone list with unit config.
}

type Scope

type Scope struct {
	Type   string   `json:"type"`
	Target []string `json:"target"`
	// contains filtered or unexported fields
}

func (*Scope) Format

func (s *Scope) Format()

type ServerConfig

type ServerConfig struct {
	SvrIP        string `json:"svr_ip"`
	SvrPort      int    `json:"svr_port"`
	SqlPort      int    `json:"sql_port"`
	AgentPort    int    `json:"agent_port"`
	WithRootSvr  string `json:"with_rootserver"`
	Status       string `json:"status"`
	BuildVersion string `json:"build_version"`
}

type SetTenantParametersParam

type SetTenantParametersParam struct {
	Parameters map[string]interface{} `json:"parameters" binding:"required"`
}

type SetTenantVariablesParam

type SetTenantVariablesParam struct {
	Variables map[string]interface{} `json:"variables" binding:"required"`
}

type StartObParam

type StartObParam struct {
	Scope             Scope             `json:"scope" binding:"required"`
	ForcePassDagParam ForcePassDagParam `json:"forcePassDag"`
}

type StartTaskParams

type StartTaskParams struct {
	Config      map[string]string `json:"config" binding:"required"`
	HealthCheck bool              `json:"healthCheck"`
}

type StopTaskParams

type StopTaskParams struct {
	Force bool `json:"force" binding:"required"`
}

type SyncAgentParams

type SyncAgentParams struct {
	Password string `json:"password" binding:"required"`
}

type TaskQueryParams

type TaskQueryParams struct {
	ShowDetails *bool `form:"show_details,default=true"`
}

type TenantBackupConfigParam

type TenantBackupConfigParam struct {
	DataBaseUri    *string `json:"data_base_uri"`
	ArchiveBaseUri *string `json:"archive_base_uri"`
	LogArchiveDestConf
	BaseBackupConfigParam
}

type TenantBackupOverview

type TenantBackupOverview struct {
	Status oceanbase.CdbObBackupTask `json:"status"`
}

type UpgradeCheckParam

type UpgradeCheckParam struct {
	Version    string `json:"version" binding:"required"`
	Release    string `json:"release" binding:"required"`
	UpgradeDir string `json:"upgradeDir" `
}

type ZoneParam

type ZoneParam struct {
	Name        string `json:"name" binding:"required"`
	ReplicaType string `json:"replica_type"` // Replica type, "FULL"(default) or "READONLY".
	PoolParam
}

Jump to

Keyboard shortcuts

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