Documentation ¶
Overview ¶
Package gse provides gse api client.
Index ¶
- func CreateTransferFileTask(ctx context.Context, ...) (string, error)
- func TerminateTransferFileTask(ctx context.Context, taskID string, targetsAgents []TransferFileAgent) (string, error)
- type CommonTaskRespData
- type CommonTaskRespResult
- type TerminateTransferFileTaskReq
- type TransferFileAgent
- type TransferFileReq
- type TransferFileResultData
- type TransferFileResultDataResult
- type TransferFileResultDataResultContent
- type TransferFileSource
- type TransferFileTarget
- type TransferFileTask
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTransferFileTask ¶
func CreateTransferFileTask(ctx context.Context, sourceAgentID, sourceContainerID, sourceFileDir, sourceUser, filename string, targetFileDir string, targetsAgents []TransferFileAgent) (string, error)
CreateTransferFileTask create sync transfer file task
func TerminateTransferFileTask ¶
func TerminateTransferFileTask(ctx context.Context, taskID string, targetsAgents []TransferFileAgent) (string, error)
TerminateTransferFileTask terminate transfer file task
Types ¶
type CommonTaskRespData ¶
type CommonTaskRespData struct {
Result CommonTaskRespResult `json:"result"`
}
CommonTaskRespData defines gse common task response data
type CommonTaskRespResult ¶
type CommonTaskRespResult struct {
TaskID string `json:"task_id"`
}
CommonTaskRespResult defines gse common task response result
type TerminateTransferFileTaskReq ¶
type TerminateTransferFileTaskReq struct { Agents []TransferFileAgent `json:"agents"` TaskID string `json:"task_id"` }
TerminateTransferFileTaskReq defines terminate transfer file task request
type TransferFileAgent ¶
type TransferFileAgent struct { User string `json:"user"` BkAgentID string `json:"bk_agent_id"` BkContainerID string `json:"bk_container_id"` }
TransferFileAgent defines transfer file task agent
type TransferFileReq ¶
type TransferFileReq struct { TimeOutSeconds int `json:"timeout_seconds"` AutoMkdir bool `json:"auto_mkdir"` UploadSpeed int `json:"upload_speed"` DownloadSpeed int `json:"download_speed"` Tasks []TransferFileTask `json:"tasks"` }
TransferFileReq defines transfer file task request
type TransferFileResultData ¶
type TransferFileResultData struct { Version string `json:"version"` Result []TransferFileResultDataResult `json:"result"` }
TransferFileResultData defines transfer file task result data
type TransferFileResultDataResult ¶
type TransferFileResultDataResult struct { Content TransferFileResultDataResultContent `json:"content"` ErrorCode int `json:"error_code"` ErrorMsg string `json:"error_msg"` }
TransferFileResultDataResult defines transfer file task result data result
func TransferFileResult ¶
func TransferFileResult(ctx context.Context, taskID string) ([]TransferFileResultDataResult, error)
TransferFileResult query transfer file task result
type TransferFileResultDataResultContent ¶
type TransferFileResultDataResultContent struct { DestAgentID string `json:"dest_agent_id"` DestContainerID string `json:"dest_container_id"` DestFileDir string `json:"dest_file_dir"` DestFileName string `json:"dest_file_name"` Mode int `json:"mode"` Progress int `json:"progress"` SourceAgentID string `json:"source_agent_id"` SourceContainerID string `json:"source_container_id"` SourceFileDir string `json:"source_file_dir"` SourceFileName string `json:"source_file_name"` Speed int `json:"speed"` Status int `json:"status"` StatusInfo string `json:"status_info"` Type string `json:"type"` StartTime int64 `json:"start_time"` EndTime int64 `json:"end_time"` Size int64 `json:"size"` }
TransferFileResultDataResultContent defines transfer file task result data result content
type TransferFileSource ¶
type TransferFileSource struct { FileName string `json:"file_name"` StoreDir string `json:"store_dir"` Agent TransferFileAgent `json:"agent"` }
TransferFileSource defines transfer file task source
type TransferFileTarget ¶
type TransferFileTarget struct { FileName string `json:"file_name"` StoreDir string `json:"store_dir"` Agents []TransferFileAgent `json:"agents"` }
TransferFileTarget defines transfer file task target
type TransferFileTask ¶
type TransferFileTask struct { Source TransferFileSource `json:"source"` Target TransferFileTarget `json:"target"` }
TransferFileTask defines transfer file task