This repository has been archived by the owner on Feb 27, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: implement an empty scheduler and update the interface
Signed-off-by: Starnop <starnop@163.com>
- Loading branch information
Showing
2 changed files
with
36 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package scheduler | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/dragonflyoss/Dragonfly/supernode/daemon/mgr" | ||
) | ||
|
||
var _ mgr.SchedulerMgr = &Manager{} | ||
|
||
// Manager is an implement of the interface of SchedulerMgr. | ||
type Manager struct { | ||
progressMgr mgr.ProgressMgr | ||
} | ||
|
||
// NewManager returns a new Manager. | ||
func NewManager(progressMgr mgr.ProgressMgr) *Manager { | ||
return &Manager{ | ||
progressMgr: progressMgr, | ||
} | ||
} | ||
|
||
// Schedule gets scheduler result with specified taskID, clientID and peerID through some rules. | ||
func (sm *Manager) Schedule(ctx context.Context, taskID, clientID, peerID string) ([]*mgr.PieceResult, error) { | ||
return nil, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters