Documentation ¶
Overview ¶
Package dts defines the DTS services of BCE. The supported APIs are all defined in sub-package
dts.go - the dts APIs definition supported by the DTS service
Index ¶
- Constants
- type CheckResult
- type Client
- func (c *Client) ConfigDts(taskId string, args *ConfigArgs) (*ConfigDtsResult, error)
- func (c *Client) CreateDts(args *CreateDtsArgs) (*CreateDtsResult, error)
- func (c *Client) DeleteDts(taskId string) error
- func (c *Client) GetDetail(taskId string) (*DtsTaskMeta, error)
- func (c *Client) GetPreCheck(taskId string) (*GetPreCheckResult, error)
- func (c *Client) GetSchema(args *GetSchemaArgs) (*GetSchemaResponse, error)
- func (c *Client) ListDts(args *ListDtsArgs) (*ListDtsResult, error)
- func (c *Client) ListDtsWithPage(args *ListDtsWithPageArgs) (*ListDtsWithPageResult, error)
- func (c *Client) PauseDts(taskId string) error
- func (c *Client) PreCheck(taskId string) (*PreCheckResult, error)
- func (c *Client) ResizeTaskStandard(taskId string, args *ResizeTaskStandardArgs) (*ResizeTaskStandardResponse, error)
- func (c *Client) ShutdownDts(taskId string) error
- func (c *Client) SkipPreCheck(taskId string) (*SkipPreCheckResponse, error)
- func (c *Client) StartDts(taskId string) error
- func (c *Client) UpdateTaskName(taskId string, args *UpdateTaskNameArgs) error
- type ConfigArgs
- type ConfigDtsResult
- type Connection
- type CreateDtsArgs
- type CreateDtsResult
- type DtsId
- type DtsTaskMeta
- type DynamicInfo
- type GetPreCheckResult
- type GetSchemaArgs
- type GetSchemaResponse
- type GetSchemaResult
- type Increment
- type InitPosition
- type ListDtsArgs
- type ListDtsResult
- type ListDtsWithPageArgs
- type ListDtsWithPageResult
- type ListFilter
- type ObjectInDb
- type PayInfo
- type PreCheckResult
- type ResizeTaskStandardArgs
- type ResizeTaskStandardResponse
- type Schema
- type SchemaInfo
- type SkipPreCheckResponse
- type SubDataScope
- type SubStatus
- type UpdateTaskNameArgs
Constants ¶
const ( URI_PREFIX = bce.URI_PREFIX + "v1" DEFAULT_ENDPOINT = "dts.baidubce.com" REQUEST_DTS_URL = "/task" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckResult ¶
type Client ¶
Client of DTS service is a kind of BceClient, so derived from BceClient
func (*Client) ConfigDts ¶
func (c *Client) ConfigDts(taskId string, args *ConfigArgs) (*ConfigDtsResult, error)
ConfigDts - config a dtsTask with the specific parameters
PARAMS:
- taskId: the specific dtsTask's ID
- args: the arguments to config a dtsTask
RETURNS:
- *ConfigDtsResult: the result of config dtsTask, contains the dtsTask's ID
- error: nil if success otherwise the specific error
func (*Client) CreateDts ¶
func (c *Client) CreateDts(args *CreateDtsArgs) (*CreateDtsResult, error)
CreateDts - create a dtsTask with the specific parameters
PARAMS:
- args: the arguments to create a dtsTask
RETURNS:
- *CreateDtsResult: the result of create dtsTask, contains new dtsTask's ID
- error: nil if success otherwise the specific error
func (*Client) DeleteDts ¶
DeleteDts - delete a dtsTask
PARAMS:
- taskId: the specific taskId
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) GetDetail ¶
func (c *Client) GetDetail(taskId string) (*DtsTaskMeta, error)
GetDetail - get a specific dtsTask's detail
PARAMS:
- taskId: the specific dtsTask's ID
RETURNS:
- *DtsTaskMeta: the specific dtsTask's detail
- error: nil if success otherwise the specific error
func (*Client) GetPreCheck ¶
func (c *Client) GetPreCheck(taskId string) (*GetPreCheckResult, error)
GetPreCheck - get a precheck result
PARAMS:
- taskId: the specific dtsTask's ID
RETURNS:
- *GetPreCheckResult: the specific dtsTask's precheck result
- error: nil if success otherwise the specific error
func (*Client) GetSchema ¶ added in v0.9.103
func (c *Client) GetSchema(args *GetSchemaArgs) (*GetSchemaResponse, error)
GetSchema - get schema
PARAMS:
- args: connection param
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) ListDts ¶
func (c *Client) ListDts(args *ListDtsArgs) (*ListDtsResult, error)
ListDts - list all dtsTask with the specific type
PARAMS:
- args: the arguments to list all dtsTask with the specific type
RETURNS:
- *ListDtsResult: the result of list all dtsTask, contains all dtsTask' detail
- error: nil if success otherwise the specific error
func (*Client) ListDtsWithPage ¶ added in v0.9.103
func (c *Client) ListDtsWithPage(args *ListDtsWithPageArgs) (*ListDtsWithPageResult, error)
ListDtsWithPage - list all dtsTask with page
PARAMS:
- args: the arguments to list all dtsTask with page
RETURNS:
- *ListDtsResult: the result of list all dtsTask, contains all dtsTask' detail
- error: nil if success otherwise the specific error
func (*Client) PauseDts ¶
PauseDts - pause a dtsTask
PARAMS:
- taskId: the specific dtsTask's ID
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) PreCheck ¶
func (c *Client) PreCheck(taskId string) (*PreCheckResult, error)
PreCheck - precheck a dtsTask
PARAMS:
- taskId: the specific dtsTask's ID
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) ResizeTaskStandard ¶ added in v0.9.103
func (c *Client) ResizeTaskStandard(taskId string, args *ResizeTaskStandardArgs) (*ResizeTaskStandardResponse, error)
ResizeTaskStandard - resize task standard
PARAMS:
- args: resize task standard param
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) ShutdownDts ¶
ShutdownDts - shutdown a dtsTask
PARAMS:
- taskId: the specific dtsTask's ID
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) SkipPreCheck ¶ added in v0.9.103
func (c *Client) SkipPreCheck(taskId string) (*SkipPreCheckResponse, error)
SkipPreCheck - skip precheck of a dts task
PARAMS:
- taskId: the specific dtsTask's ID
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) StartDts ¶
StartDts - start a dtsTask
PARAMS:
- taskId: the specific dtsTask's ID
RETURNS:
- error: nil if success otherwise the specific error
func (*Client) UpdateTaskName ¶ added in v0.9.103
func (c *Client) UpdateTaskName(taskId string, args *UpdateTaskNameArgs) error
UpdateTaskName - update task name
PARAMS:
- args: update task name param
RETURNS:
- error: nil if success otherwise the specific error
type ConfigArgs ¶
type ConfigArgs struct { Type string `json:"type,omitempty"` DtsId string `json:"dtsId,omitempty"` TaskName string `json:"taskName"` DataType []string `json:"dataType"` SrcConnection Connection `json:"srcConnection"` DstConnection Connection `json:"dstConnection"` SchemaMapping []Schema `json:"schemaMapping"` Granularity string `json:"granularity,omitempty"` ProductType string `json:"productType,omitempty"` QueueType string `json:"queueType,omitempty"` InitPosition InitPosition `json:"initPosition,omitempty"` NetType string `json:"netType,omitempty"` Admin string `json:"admin,omitempty"` }
type ConfigDtsResult ¶
type ConfigDtsResult struct {
DtsId string `json:"dtsId"`
}
type Connection ¶
type Connection struct { Region string `json:"region"` DbType string `json:"dbType"` DbUser string `json:"dbUser"` DbPass string `json:"dbPass"` DbPort int `json:"dbPort"` DbHost string `json:"dbHost"` InstanceId string `json:"instanceId"` DbServer string `json:"dbServer,omitempty"` InstanceType string `json:"instanceType"` InstanceShortId string `json:"instanceShortId,omitempty"` FieldWhitelist string `json:"field_whitelist,omitempty"` FieldBlacklist string `json:"field_blacklist,omitempty"` StartTime string `json:"startTime,omitempty"` EndTime string `json:"endTime,omitempty"` SqlType string `json:"sqlType,omitempty"` }
type CreateDtsArgs ¶
type CreateDtsArgs struct { ClientToken string `json:"-"` ProductType string `json:"productType"` Type string `json:"type"` Standard string `json:"standard"` SourceInstanceType string `json:"sourceInstanceType"` TargetInstanceType string `json:"targetInstanceType"` CrossRegionTag int `json:"crossRegionTag"` DirectionType string `json:"directionType"` }
type CreateDtsResult ¶
type CreateDtsResult struct {
DtsTasks []DtsId `json:"dtsTasks"`
}
type DtsTaskMeta ¶
type DtsTaskMeta struct { DtsId string `json:"dtsId"` TaskName string `json:"taskName"` Status string `json:"status"` DataType []string `json:"dataType"` Region string `json:"region"` CreateTime string `json:"createTime"` SrcConnection Connection `json:"srcConnection"` DstConnection Connection `json:"dstConnection"` SchemaMapping []Schema `json:"schemaMapping,omitempty"` RunningTime int `json:"runningTime"` SubStatus []SubStatus `json:"subStatus,omitempty"` DynamicInfo DynamicInfo `json:"dynamicInfo,omitempty"` Errmsg string `json:"errmsg,omitempty"` SdkRealtimeProgress string `json:"sdkRealtimeProgress,omitempty"` Granularity string `json:"granularity,omitempty"` SubDataScope SubDataScope `json:"subDataScope,omitempty"` PayInfo PayInfo `json:"payInfo,omitempty"` LockStatus string `json:"lockStatus,omitempty"` DtsIdPos string `json:"dtsIdPos,omitempty"` DtsIdNeg string `json:"dtsIdNeg,omitempty"` DtsTaskPos *DtsTaskMeta `json:"dtsTaskPos"` DtsTaskNeg *DtsTaskMeta `json:"dtsTaskNeg"` }
type DynamicInfo ¶
type DynamicInfo struct { Schema []SchemaInfo `json:"schema"` Base []SchemaInfo `json:"base"` Increment Increment `json:"increment"` }
type GetPreCheckResult ¶
type GetPreCheckResult struct { Success bool `json:"success"` Result []CheckResult `json:"result"` }
type GetSchemaArgs ¶ added in v0.9.103
type GetSchemaArgs struct {
Connection Connection `json:"connection"`
}
type GetSchemaResponse ¶ added in v0.9.103
type GetSchemaResponse struct { Success bool `json:"success"` Result GetSchemaResult `json:"result"` }
type GetSchemaResult ¶ added in v0.9.103
type GetSchemaResult struct {
SchemaAll map[string]ObjectInDb `json:"schemaAll"`
}
type InitPosition ¶
type ListDtsArgs ¶
type ListDtsResult ¶
type ListDtsResult struct { Marker string `json:"marker"` MaxKeys int `json:"maxKeys"` IsTruncated bool `json:"isTruncated"` NextMarker string `json:"nextMarker"` Task []DtsTaskMeta `json:"task"` }
type ListDtsWithPageArgs ¶ added in v0.9.103
type ListDtsWithPageResult ¶ added in v0.9.103
type ListFilter ¶ added in v0.9.103
type ObjectInDb ¶ added in v0.9.103
type PayInfo ¶
type PayInfo struct { ProductType string `json:"productType"` SourceInstanceType string `json:"sourceInstanceType"` TargetInstanceType string `json:"targetInstanceType"` CrossRegionTag int `json:"crossRegionTag"` CreateTime int `json:"createTime"` Standard string `json:"standard"` EndTime string `json:"endTime"` }
type PreCheckResult ¶
type ResizeTaskStandardArgs ¶ added in v0.9.103
type ResizeTaskStandardResponse ¶ added in v0.9.103
type ResizeTaskStandardResponse struct {
OrderId string `json:"orderId"`
}
type SchemaInfo ¶
type SkipPreCheckResponse ¶ added in v0.9.103
type SubDataScope ¶
type UpdateTaskNameArgs ¶ added in v0.9.103
type UpdateTaskNameArgs struct {
TaskName string `json:"taskName"`
}