Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReadableResumableRecorderMedium ¶
type ReadableResumableRecorderMedium interface {
io.Closer
// 读取下一条记录
Next(*ResumableRecord) error
}
只读的可恢复记录仪介质接口
type ResumableRecord ¶
type ResumableRecord struct {
// 分片偏移量
Offset uint64
// 分片大小
PartSize uint64
// 分片写入量
PartWritten uint64
}
可恢复记录
type ResumableRecorder ¶
type ResumableRecorder interface {
// 打开记录仪介质以读取记录
OpenForReading(*ResumableRecorderOpenArgs) ReadableResumableRecorderMedium
// 打开记录仪介质以追加记录
OpenForAppending(*ResumableRecorderOpenArgs) WriteableResumableRecorderMedium
// 新建记录仪介质以追加记录
OpenForCreatingNew(*ResumableRecorderOpenArgs) WriteableResumableRecorderMedium
// 删除记录仪介质
Delete(*ResumableRecorderOpenArgs) error
// 清理过期的记录仪介质
ClearOutdated(createdBefore time.Duration) error
}
可恢复记录仪接口
func NewJsonFileSystemResumableRecorder ¶
func NewJsonFileSystemResumableRecorder(dirPath string) ResumableRecorder
创建记录文件系统的可恢复记录仪
type ResumableRecorderOpenArgs ¶
type ResumableRecorderOpenArgs struct {
// 数据源 ETag
ETag string
// 数据目标 ID
DestinationID string
// 分片大小
PartSize uint64
// 数据源大小
TotalSize uint64
// 数据源偏移量
Offset uint64
}
可恢复记录仪选项
type WriteableResumableRecorderMedium ¶
type WriteableResumableRecorderMedium interface {
io.Closer
// 写入下一条记录
Write(*ResumableRecord) error
}
只追家的可恢复记录仪介质接口
Click to show internal directories.
Click to hide internal directories.