mongo

package
v0.5.0-beta2.6 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PartVarPartitionIDField = "taskPartId"
)

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 *mgo.DbClient, col string, partID int16, hashPartition func(taskKey string) int16) *TaskScheduler

func (*TaskScheduler) Close

func (ts *TaskScheduler) Close(ctx context.Context) 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) RemoveTaskSchedule

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

func (*TaskScheduler) ScheduleTask

func (ts *TaskScheduler) ScheduleTask(ctx context.Context, tk task.Task, cover bool) 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