Feat: chunk upload handling for local policy

This commit is contained in:
HFO4
2022-02-27 14:13:39 +08:00
parent c301bd6045
commit 3444b4a75e
17 changed files with 280 additions and 67 deletions

View File

@@ -50,6 +50,8 @@ func NewDriver(node cluster.Node, handler driver.Handler, policy *model.Policy)
// Put 将ctx中指定的从机物理文件由从机上传到目标存储策略
func (d *Driver) Put(ctx context.Context, file fsctx.FileHeader) error {
defer file.Close()
src, ok := ctx.Value(fsctx.SlaveSrcPath).(string)
if !ok {
return ErrSlaveSrcPathNotExist