mongo

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TaskScheduler

type TaskScheduler struct {
	// contains filtered or unexported fields
}

func NewTaskScheduler

func NewTaskScheduler(database *mongo.Database, col string, hashPartition func(taskKey string) int16) *TaskScheduler

func (*TaskScheduler) Close

func (ts *TaskScheduler) Close(ctx context.Context) error

func (*TaskScheduler) CloseTaskSchedule

func (ts *TaskScheduler) CloseTaskSchedule(ctx context.Context, tk task.Task) error

func (*TaskScheduler) NewStageID

func (ts *TaskScheduler) NewStageID(ctx context.Context, taskKey string) (stageID int64, err error)

func (*TaskScheduler) ReadTask

func (ts *TaskScheduler) ReadTask(ctx context.Context, taskKey string) (*task.Task, error)

func (*TaskScheduler) ScheduleTask

func (ts *TaskScheduler) ScheduleTask(ctx context.Context, tk task.Task, overlap bool) (task.Task, error)

func (*TaskScheduler) WaitTaskAwaken

func (ts *TaskScheduler) WaitTaskAwaken(ctx context.Context) (awaken task.Awaken, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL