Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Commit

Permalink
feature: add interfaces about pieces md5
Browse files Browse the repository at this point in the history
Signed-off-by: Starnop <starnop@163.com>
  • Loading branch information
starnop committed May 5, 2019
1 parent 5bdd16a commit 33cc6aa
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions supernode/daemon/mgr/task_mgr.go
Expand Up @@ -43,4 +43,14 @@ type TaskMgr interface {
// We use a sting called pieceRange to identify a piece.
// A pieceRange separated by a dash, like this: 0-45565, etc.
UpdatePieceStatus(ctx context.Context, taskID, pieceRange string, pieceUpdateRequest *types.PieceUpdateRequest) error

// GetPieceMD5 returns the md5 of pieceNum for taskID.
GetPieceMD5(ctx context.Context, taskID string, pieceNum int) (pieceMD5 string, err error)

// SetPieceMD5 set the md5 for pieceNum of taskID.
SetPieceMD5(ctx context.Context, taskID string, pieceNum int, pieceMD5 string) (err error)

// GetPieceMD5sByTaskID returns all pieceMD5s as a string slice.
// All pieceMD5s are returned only if the CDN status is successful.
GetPieceMD5sByTaskID(ctx context.Context, taskID string) (pieceMD5s []string, err error)
}

0 comments on commit 33cc6aa

Please sign in to comment.