Skip to content
This repository was archived by the owner on Dec 20, 2024. It is now read-only.

Commit ef3d3c4

Browse files
authored
Merge pull request #1358 from antsystem/feat/define-schedule-peer-info
add schedule peer info
2 parents 88cb9fa + 0dc8afb commit ef3d3c4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

dfget/corev2/basic/types.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,19 @@ import (
2020
"github.com/dragonflyoss/Dragonfly/apis/types"
2121
)
2222

23+
// SchedulePeerInfo defines how to get resource from peer info.
24+
type SchedulePeerInfo struct {
25+
// basic peer info
26+
*types.PeerInfo
27+
// Path represents the path to get resource from the peer.
28+
Path string
29+
}
30+
2331
// SchedulerResult defines the result of schedule of range data.
2432
type SchedulePieceDataResult struct {
2533
Off int64
2634
Size int64
2735

2836
// PeerInfos represents the schedule peers which to get the range data.
29-
PeerInfos []*types.PeerInfo
37+
PeerInfos []*SchedulePeerInfo
3038
}

0 commit comments

Comments
 (0)