shad-go/distbuild/pkg/scheduler/scheduler.go

54 lines
1,016 B
Go
Raw Normal View History

2020-04-05 13:24:48 +00:00
// +build !solution
2020-03-28 21:34:09 +00:00
package scheduler
import (
2020-04-05 11:29:46 +00:00
"context"
2020-03-28 21:34:09 +00:00
"time"
"go.uber.org/zap"
2020-03-29 16:03:07 +00:00
"gitlab.com/slon/shad-go/distbuild/pkg/api"
2020-03-28 21:34:09 +00:00
"gitlab.com/slon/shad-go/distbuild/pkg/build"
)
2021-04-25 13:10:08 +00:00
var TimeAfter = time.After
2020-04-05 13:24:48 +00:00
2020-03-28 21:34:09 +00:00
type PendingJob struct {
2020-04-04 21:49:25 +00:00
Job *api.JobSpec
2020-03-28 21:34:09 +00:00
Finished chan struct{}
2020-04-05 11:29:46 +00:00
Result *api.JobResult
2020-03-28 21:34:09 +00:00
}
type Config struct {
CacheTimeout time.Duration
DepsTimeout time.Duration
}
type Scheduler struct {
}
func NewScheduler(l *zap.Logger, config Config) *Scheduler {
2020-04-05 13:24:48 +00:00
panic("implement me")
2020-03-28 21:34:09 +00:00
}
2020-04-05 12:00:33 +00:00
func (c *Scheduler) LocateArtifact(id build.ID) (api.WorkerID, bool) {
2020-04-05 13:24:48 +00:00
panic("implement me")
2020-04-05 12:00:33 +00:00
}
2020-03-29 16:03:07 +00:00
func (c *Scheduler) RegisterWorker(workerID api.WorkerID) {
2020-04-05 13:24:48 +00:00
panic("implement me")
2020-03-28 21:34:09 +00:00
}
2020-03-29 16:03:07 +00:00
func (c *Scheduler) OnJobComplete(workerID api.WorkerID, jobID build.ID, res *api.JobResult) bool {
2020-04-05 13:24:48 +00:00
panic("implement me")
2020-03-28 21:34:09 +00:00
}
2020-04-04 21:49:25 +00:00
func (c *Scheduler) ScheduleJob(job *api.JobSpec) *PendingJob {
2020-04-05 13:24:48 +00:00
panic("implement me")
2020-03-28 21:34:09 +00:00
}
2020-04-05 11:29:46 +00:00
func (c *Scheduler) PickJob(ctx context.Context, workerID api.WorkerID) *PendingJob {
2020-04-05 13:24:48 +00:00
panic("implement me")
2020-03-28 21:34:09 +00:00
}