Documentation ¶
Index ¶
- func OperationConditionURI(condition OperationCondition) string
- type Handler
- type Info
- type Metric
- func (m *Metric) AddCurrentCount(count int64)
- func (m *Metric) AddFailureCount(count int64)
- func (m *Metric) AddSkippedCount(count int64)
- func (m *Metric) AddSuccessCount(count int64)
- func (m *Metric) AddTotalCount(count int64)
- func (m *Metric) DisablePrintProgress()
- func (m *Metric) End()
- func (m *Metric) Lock()
- func (m *Metric) PrintProgress(tag string)
- func (m *Metric) Start()
- func (m *Metric) Unlock()
- type Operation
- type OperationCondition
- type OperationCreator
- type OperationResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OperationConditionURI ¶
func OperationConditionURI(condition OperationCondition) string
Types ¶
type Handler ¶
type Handler interface { EmptyOperation(emptyOperation func() flow.Work) Handler SetFileExport(exporter *export.FileExporter) Handler ItemsToOperation(func(items []string) (operation Operation, err *data.CodeError)) Handler OnResult(func(operationInfo string, operation Operation, result *OperationResult)) Handler OnError(func(err *data.CodeError)) Handler Start() }
func NewHandler ¶
type Info ¶
type Info struct { flow.Info export.FileExporterConfig Overwrite bool // 是否覆盖 // 工作数据源 WorkList []flow.Work // 工作数据源:列表 InputFile string // 工作数据源:文件 ItemSeparate string // 工作数据源:每行元素按分隔符分的分隔符 MinItemsCount int // 工作数据源:每行元素最小数量 EnableStdin bool // 工作数据源:stdin, 当 InputFile 不存在时使用 stdin EnableRecord bool // 是否开启 record RecordRedoWhileError bool // 重新执行任务时,如果任务已执行但是失败,则再重新执行一次。 MaxOperationCountPerRequest int }
type Metric ¶ added in v2.8.0
type Metric struct { Duration int64 `json:"duration"` TotalCount int64 `json:"total_count"` CurrentCount int64 `json:"-"` SuccessCount int64 `json:"success_count"` FailureCount int64 `json:"failure_count"` SkippedCount int64 `json:"skipped_count"` // contains filtered or unexported fields }
func (*Metric) AddCurrentCount ¶ added in v2.8.0
func (*Metric) AddFailureCount ¶ added in v2.8.0
func (*Metric) AddSkippedCount ¶ added in v2.8.0
func (*Metric) AddSuccessCount ¶ added in v2.8.0
func (*Metric) AddTotalCount ¶ added in v2.8.0
func (*Metric) DisablePrintProgress ¶ added in v2.8.0
func (m *Metric) DisablePrintProgress()
func (*Metric) PrintProgress ¶ added in v2.8.0
type OperationCondition ¶
type OperationCondition struct { FileHash string `json:"file_hash"` FileMime string `json:"file_mime"` FileSize string `json:"file_size"` PutTime string `json:"put_time"` }
OperationCondition 参考链接:https://github.com/qbox/product/blob/eb21b8c26f20e967fa51b210d267c5a4d5ca2af7/kodo/rs.md#delete-%E5%88%A0%E9%99%A4%E8%B5%84%E6%BA%90
type OperationCreator ¶
type OperationResult ¶
type OperationResult struct { Code int `json:"code"` Hash string `json:"hash"` FSize int64 `json:"fsize"` PutTime int64 `json:"putTime"` MimeType string `json:"mimeType"` Type int `json:"type"` Error string `json:"error"` Parts []int64 `json:"parts"` }
func (*OperationResult) ErrorDescription ¶ added in v2.8.0
func (r *OperationResult) ErrorDescription() string
func (*OperationResult) IsSuccess ¶
func (r *OperationResult) IsSuccess() bool
func (*OperationResult) IsValid ¶ added in v2.8.0
func (r *OperationResult) IsValid() bool
Click to show internal directories.
Click to hide internal directories.