task

package
v0.0.0-...-5e74752 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MaxRetry     int           = 5
	LoopInterval time.Duration = 5 * time.Second
)
View Source
var (
	// If this error was returned by Course.Elect, the task would be restarted immediately.
	ErrSessionExpired = errors.New("icarus: session expired")
)

Functions

This section is empty.

Types

type Task

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

func NewTask

func NewTask(user icarus.User, courses []icarus.Course) *Task

Make a new task.

func (*Task) Courses

func (t *Task) Courses() []icarus.Course

Get this task's candidate courses.

func (*Task) Restart

func (t *Task) Restart()

Restart this task.

func (*Task) Start

func (t *Task) Start()

Start this task.

func (*Task) Statistics

func (t *Task) Statistics() icarus.Stat

Get this task's statistics.

func (*Task) Stop

func (t *Task) Stop()

Terminate this task.

func (*Task) User

func (t *Task) User() icarus.User

Get this task's login user.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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