Documentation ¶
Index ¶
- Variables
- func GetKeyRanges(n int) []structs.KeyRange
- type Control
- func (ctl *Control) ActiveWorkerPool() []*Worker
- func (ctl *Control) Heartbeat(ctx context.Context, req *pb.HeartbeatRequest) (*pb.HeartbeatResponse, error)
- func (ctl *Control) PullTask(ctx context.Context, req *pb.PullTaskRequest) (*pb.PullTaskResponse, error)
- func (ctl *Control) ReportTask(ctx context.Context, req *pb.ReportTaskRequest) (*pb.ReportTaskResponse, error)
- func (ctl *Control) SubmitJob(req *pb.SubmitJobRequest, resp pb.Control_SubmitJobServer) error
- type Event
- type FCFSSchedule
- type FCFSScheduleItem
- type Job
- type OnceSchedule
- type Worker
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrJobFinished = errors.New("job is finished")
View Source
var ErrUnknownState = errors.New("unknown state change")
Functions ¶
func GetKeyRanges ¶
Types ¶
type Control ¶
type Control struct { Address string pb.UnimplementedControlServer // contains filtered or unexported fields }
func (*Control) ActiveWorkerPool ¶
func (*Control) Heartbeat ¶
func (ctl *Control) Heartbeat(ctx context.Context, req *pb.HeartbeatRequest) (*pb.HeartbeatResponse, error)
func (*Control) PullTask ¶
func (ctl *Control) PullTask(ctx context.Context, req *pb.PullTaskRequest) (*pb.PullTaskResponse, error)
func (*Control) ReportTask ¶
func (ctl *Control) ReportTask(ctx context.Context, req *pb.ReportTaskRequest) (*pb.ReportTaskResponse, error)
func (*Control) SubmitJob ¶
func (ctl *Control) SubmitJob(req *pb.SubmitJobRequest, resp pb.Control_SubmitJobServer) error
type FCFSSchedule ¶
type FCFSSchedule struct {
// contains filtered or unexported fields
}
func (*FCFSSchedule) Dequeue ¶
func (tq *FCFSSchedule) Dequeue() *pb.Task
func (*FCFSSchedule) Empty ¶
func (tq *FCFSSchedule) Empty() bool
func (*FCFSSchedule) Enqueue ¶
func (tq *FCFSSchedule) Enqueue(task *pb.Task)
func (*FCFSSchedule) Peek ¶
func (tq *FCFSSchedule) Peek() *pb.Task
type FCFSScheduleItem ¶
type FCFSScheduleItem struct { Task *pb.Task Next *FCFSScheduleItem }
type Job ¶
type Job struct {
// contains filtered or unexported fields
}
func (*Job) HasScheduledTask ¶
HasScheduledTask returns true if there is a task assigned to the worker.
func (*Job) Initialize ¶
type OnceSchedule ¶
type OnceSchedule struct {
// contains filtered or unexported fields
}
func NewOnceSchedule ¶
func NewOnceSchedule(poolSize int) *OnceSchedule
func (*OnceSchedule) AllScheduled ¶
func (mq *OnceSchedule) AllScheduled() bool
func (*OnceSchedule) Schedule ¶
func (mq *OnceSchedule) Schedule(i int) bool
Click to show internal directories.
Click to hide internal directories.