Documentation ¶
Index ¶
- Constants
- Variables
- func Delete(c *golangsdk.ServiceClient, opts BatchDeleteJobReq) *golangsdk.ErrResult
- func Update(c *golangsdk.ServiceClient, opts UpdateReq) (*golangsdk.Result, error)
- type ActionResp
- type ActionResult
- type AlarmNotifyInfo
- type BatchCreateJobReq
- type BatchDeleteJobReq
- type BatchLimitSpeedReq
- type BatchPrecheckReq
- type CheckItem
- type ChildrenJobInfo
- type CreateJobReq
- type CreateJobResp
- type CreateResp
- type DefaultRootDb
- type DeleteJobReq
- type Endpoint
- type InstInfo
- type JobDetail
- type JobDetailResp
- type JobInfo
- type JobStatus
- type JobsListResp
- type LimitSpeedReq
- type ListJobsReq
- type PageReq
- type PreCheckDetail
- type PreCheckInfo
- type PrecheckFailSubJobVO
- type PrecheckResp
- type PrecheckResult
- type PrecheckResultResp
- type QueryJobReq
- type QueryPrecheckResultReq
- type SpeedLimitInfo
- type StartInfo
- type StartJobReq
- type StatusResp
- type SubscriptionInfo
- type TestConnectionsReq
- type TestEndPoint
- type UpdateJobReq
- type UpdateReq
Constants ¶
View Source
const ( DeleteTypeTerminate = "terminate" DeleteTypeForceTerminate = "force_terminate" DeleteTypeDelete = "delete" )
Variables ¶
View Source
var RequestOpts = golangsdk.RequestOpts{ MoreHeaders: map[string]string{"Content-Type": "application/json", "X-Language": "en-us"}, }
Functions ¶
func Delete ¶
func Delete(c *golangsdk.ServiceClient, opts BatchDeleteJobReq) *golangsdk.ErrResult
Types ¶
type ActionResp ¶
type ActionResp struct { Results []ActionResult `json:"results"` Count int `json:"count"` }
func LimitSpeed ¶
func LimitSpeed(c *golangsdk.ServiceClient, opts BatchLimitSpeedReq) (*ActionResp, error)
func Start ¶
func Start(c *golangsdk.ServiceClient, opts StartJobReq) (*ActionResp, error)
func TestConnections ¶
func TestConnections(c *golangsdk.ServiceClient, opts TestConnectionsReq) (*ActionResp, error)
type ActionResult ¶
type AlarmNotifyInfo ¶
type AlarmNotifyInfo struct { DelayTime *int `json:"delay_time,omitempty"` RtoDelay *int `json:"rto_delay,omitempty"` RpoDelay *int `json:"rpo_delay,omitempty"` AlarmToUser bool `json:"alarm_to_user" required:"true"` Subscriptions []SubscriptionInfo `json:"subscriptions,omitempty"` }
type BatchCreateJobReq ¶
type BatchCreateJobReq struct {
Jobs []CreateJobReq `json:"jobs" required:"true"`
}
type BatchDeleteJobReq ¶
type BatchDeleteJobReq struct {
Jobs []DeleteJobReq `json:"jobs" required:"true"`
}
type BatchLimitSpeedReq ¶
type BatchLimitSpeedReq struct {
SpeedLimits []LimitSpeedReq `json:"speed_limits" required:"true"`
}
type BatchPrecheckReq ¶
type BatchPrecheckReq struct {
Jobs []PreCheckInfo `json:"jobs" required:"true"`
}
type ChildrenJobInfo ¶
type ChildrenJobInfo struct { BillingTag string `json:"billing_tag"` CreateTime string `json:"create_time"` DbUseType string `json:"db_use_type"` Description string `json:"description"` EngineType string `json:"engine_type"` ErrorMsg string `json:"error_msg"` Id string `json:"id"` JobDirection string `json:"job_direction"` Name string `json:"name"` NetType string `json:"net_type"` NodeNewFramework string `json:"node_newFramework"` Status string `json:"status"` TaskType string `json:"task_type"` }
type CreateJobReq ¶
type CreateJobReq struct { BindEip *bool `json:"bind_eip,omitempty"` DbUseType string `json:"db_use_type" required:"true"` Name string `json:"name" required:"true"` Description string `json:"description,omitempty"` EngineType string `json:"engine_type" required:"true"` IsTargetReadonly *bool `json:"is_target_readonly,omitempty"` JobDirection string `json:"job_direction" required:"true"` NetType string `json:"net_type" required:"true"` NodeNum *int `json:"node_num,omitempty"` NodeType string `json:"node_type" required:"true"` SourceEndpoint Endpoint `json:"source_endpoint" required:"true"` TargetEndpoint Endpoint `json:"target_endpoint" required:"true"` TaskType string `json:"task_type" required:"true"` SubnetId string `json:"customize_sutnet_id" required:"true"` ProductId string `json:"product_id,omitempty"` ExpiredDays string `json:"expired_days,omitempty"` MultiWrite *bool `json:"multi_write,omitempty"` Tags []tags.ResourceTag `json:"tags,omitempty"` SysTags []tags.ResourceTag `json:"sys_tags,omitempty"` }
type CreateJobResp ¶
type CreateResp ¶
type CreateResp struct { Results []CreateJobResp `json:"results"` Count int `json:"count"` }
func Create ¶
func Create(c *golangsdk.ServiceClient, opts BatchCreateJobReq) (*CreateResp, error)
type DefaultRootDb ¶
type DeleteJobReq ¶
type Endpoint ¶
type Endpoint struct { DbType string `json:"db_type" required:"true"` AzCode string `json:"az_code,omitempty"` Region string `json:"region,omitempty"` InstanceId string `json:"inst_id,omitempty"` InstanceName string `json:"inst_name,omitempty"` VpcId string `json:"vpc_id,omitempty"` SubnetId string `json:"subnet_id,omitempty"` SecurityGroupId string `json:"security_group_id,omitempty"` ProjectId string `json:"project_id,omitempty"` DbName string `json:"db_name,omitempty"` Ip string `json:"ip,omitempty"` DbPort *int `json:"db_port,omitempty"` DbUser string `json:"db_user,omitempty"` DbPassword string `json:"db_password,omitempty"` SslCertPassword string `json:"ssl_cert_password,omitempty"` SslCertCheckSum string `json:"ssl_cert_check_sum,omitempty"` SslCertKey string `json:"ssl_cert_key,omitempty"` SslCertName string `json:"ssl_cert_name,omitempty"` SslLink *bool `json:"ssl_link,omitempty"` SafeMode *int `json:"safe_mode,omitempty"` MongoHaMode string `json:"mongo_ha_mode,omitempty"` Topic string `json:"topic,omitempty"` ClusterMode string `json:"cluster_mode,omitempty"` }
type JobDetail ¶
type JobDetail struct { Id string `json:"id"` ParentId string `json:"parent_id"` Name string `json:"name"` Status string `json:"status"` Description string `json:"description"` CreateTime string `json:"create_time"` TaskType string `json:"task_type"` SourceEndpoint Endpoint `json:"source_endpoint"` DmqEndpoint Endpoint `json:"dmq_endpoint"` SourceSharding []Endpoint `json:"source_sharding"` TargetEndpoint Endpoint `json:"target_endpoint"` NetType string `json:"net_type"` FailedReason string `json:"failed_reason"` InstInfo InstInfo `json:"inst_info"` ActualStartTime string `json:"actual_start_time"` FullTransferCompleteTime string `json:"full_transfer_complete_time"` UpdateTime string `json:"update_time"` JobDirection string `json:"job_direction"` DbUseType string `json:"db_use_type"` NeedRestart bool `json:"need_restart"` IsTargetReadonly bool `json:"is_target_readonly"` ConflictPolicy string `json:"conflict_policy"` FilterDdlPolicy string `json:"filter_ddl_policy"` SpeedLimit []SpeedLimitInfo `json:"speed_limit"` SchemaType string `json:"schema_type"` NodeNum string `json:"node_num"` ObjectSwitch bool `json:"object_switch"` MasterJobId string `json:"master_job_id"` FullMode string `json:"full_mode"` StructTrans bool `json:"struct_trans"` IndexTrans bool `json:"index_trans"` ReplaceDefiner bool `json:"replace_definer"` MigrateUser bool `json:"migrate_user"` SyncDatabase bool `json:"sync_database"` ErrorCode string `json:"error_code"` ErrorMessage string `json:"error_message"` TargetRootDb DefaultRootDb `json:"target_root_db"` AzCode string `json:"az_code"` VpcId string `json:"vpc_id"` SubnetId string `json:"subnet_id"` SecurityGroupId string `json:"security_group_id"` MultiWrite bool `json:"multi_write"` SupportIpV6 bool `json:"support_ip_v6"` InheritId string `json:"inherit_id"` Gtid string `json:"gtid"` AlarmNotify string `json:"alarm_notify"` IncreStartPosition string `json:"incre_start_position"` }
type JobDetailResp ¶
func Get ¶
func Get(c *golangsdk.ServiceClient, opts QueryJobReq) (*JobDetailResp, error)
type JobInfo ¶
type JobInfo struct { Id string `json:"id"` Name string `json:"name"` Status string `json:"status"` Description string `json:"description"` CreateTime string `json:"create_time"` EngineType string `json:"engine_type"` NetType string `json:"net_type"` BillingTag bool `json:"billing_tag"` JobDirection string `json:"job_direction"` DbUseType string `json:"db_use_type"` TaskType string `json:"task_type"` Children []ChildrenJobInfo `json:"children"` NodeNewFramework bool `json:"node_newFramework"` }
type JobsListResp ¶
func List ¶
func List(c *golangsdk.ServiceClient, opts ListJobsReq) (*JobsListResp, error)
type LimitSpeedReq ¶
type LimitSpeedReq struct { JobId string `json:"job_id" required:"true"` SpeedLimit []SpeedLimitInfo `json:"speed_limit" required:"true"` }
type ListJobsReq ¶
type ListJobsReq struct { CurPage int `json:"cur_page" required:"true"` PerPage int `json:"per_page" required:"true"` DbUseType string `json:"db_use_type" required:"true"` EngineType string `json:"engine_type,omitempty"` EnterpriseProjectId string `json:"enterprise_project_id,omitempty"` // name or id Name string `json:"name,omitempty"` NetType string `json:"net_type,omitempty"` ServiceName string `json:"service_name,omitempty"` Status string `json:"status,omitempty"` Tags []tags.ResourceTag `json:"tags,omitempty"` }
type PreCheckDetail ¶
type PreCheckInfo ¶
type PrecheckFailSubJobVO ¶
type PrecheckResp ¶
type PrecheckResp struct { Results []PreCheckDetail `json:"results"` Count int `json:"count"` }
func PreCheckJobs ¶
func PreCheckJobs(c *golangsdk.ServiceClient, opts BatchPrecheckReq) (*PrecheckResp, error)
type PrecheckResult ¶
type PrecheckResult struct { PrecheckId string `json:"precheck_id"` Result bool `json:"result"` Process string `json:"process"` TotalPassedRate string `json:"total_passed_rate"` RdsInstanceId string `json:"rds_instance_id"` JobDirection string `json:"job_direction"` PrecheckResult []CheckItem `json:"precheck_result"` ErrorMsg string `json:"error_msg"` ErrorCode string `json:"error_code"` }
type PrecheckResultResp ¶
type PrecheckResultResp struct { Count int `json:"count"` Results []PrecheckResult `json:"results"` }
func CheckResults ¶
func CheckResults(c *golangsdk.ServiceClient, opts QueryPrecheckResultReq) (*PrecheckResultResp, error)
type QueryJobReq ¶
type QueryPrecheckResultReq ¶
type QueryPrecheckResultReq struct {
Jobs []string `json:"jobs" required:"true"`
}
type SpeedLimitInfo ¶
type StartJobReq ¶
type StartJobReq struct {
Jobs []StartInfo `json:"jobs" required:"true"`
}
type StatusResp ¶
func Status ¶
func Status(c *golangsdk.ServiceClient, opts QueryJobReq) (*StatusResp, error)
type SubscriptionInfo ¶
type TestConnectionsReq ¶
type TestConnectionsReq struct {
Jobs []TestEndPoint `json:"jobs" required:"true"`
}
type TestEndPoint ¶
type TestEndPoint struct { JobId string `json:"id" required:"true"` NetType string `json:"net_type" required:"true"` // source DB:so, target DB:ta EndPointType string `json:"end_point_type" required:"true"` DbType string `json:"db_type" required:"true"` Ip string `json:"ip" required:"true"` DbUser string `json:"db_user" required:"true"` DbPassword string `json:"db_password" required:"true"` //when type is Mongo、DDS, must be `0` DbPort *int `json:"db_port,omitempty"` DbName string `json:"db_name,omitempty"` Region string `json:"region,omitempty"` ProjectId string `json:"project_id,omitempty"` InstId string `json:"inst_id,omitempty"` VpcId string `json:"vpc_id,omitempty"` SubnetId string `json:"subnet_id,omitempty"` SslLink *bool `json:"ssl_link,omitempty"` SslCertKey string `json:"ssl_cert_key,omitempty"` SslCertName string `json:"ssl_cert_name,omitempty"` SslCertCheckSum string `json:"ssl_cert_check_sum,omitempty"` SslCertPassword string `json:"ssl_cert_password,omitempty"` }
type UpdateJobReq ¶
type UpdateJobReq struct { JobId string `json:"job_id" required:"true"` Name string `json:"name,omitempty"` SourceEndpoint *Endpoint `json:"source_endpoint,omitempty"` TargetEndpoint *Endpoint `json:"target_endpoint,omitempty"` NodeType string `json:"node_type,omitempty"` EngineType string `json:"engine_type,omitempty"` NetType string `json:"net_type,omitempty"` StoreDbInfo bool `json:"store_db_info,omitempty"` IsRecreate *bool `json:"is_recreate,omitempty"` Description string `json:"description,omitempty"` TaskType string `json:"task_type,omitempty"` DbUseType string `json:"db_use_type,omitempty"` JobDirection string `json:"job_direction,omitempty"` IsTargetReadonly *bool `json:"is_target_readonly,omitempty"` ProductId string `json:"product_id,omitempty"` ReplaceDefiner *bool `json:"replace_definer,omitempty"` Tags []tags.ResourceTag `json:"tags,omitempty"` AlarmNotify *AlarmNotifyInfo `json:"alarm_notify,omitempty"` }
type UpdateReq ¶
type UpdateReq struct {
Jobs []UpdateJobReq `json:"jobs" required:"true"`
}
Click to show internal directories.
Click to hide internal directories.