schedule

package
v2.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IOWorkloader

type IOWorkloader interface {
	IOWorkload()
}

IOWorkloader will be included in Worker Pool.

type RealScheduler

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

RealScheduler will hold the task's sub tasks.

func NewScheduler

func NewScheduler(pool *navvy.Pool) *RealScheduler

NewScheduler will create a new RealScheduler.

func (*RealScheduler) Async

func (s *RealScheduler) Async(task navvy.Task)

Async will create a new task immediately.

func (*RealScheduler) Sync

func (s *RealScheduler) Sync(task navvy.Task)

Sync will return after this task finished.

func (*RealScheduler) Wait

func (s *RealScheduler) Wait()

Wait will wait until a task finished.

type Scheduler

type Scheduler interface {
	Sync(task navvy.Task)
	Async(task navvy.Task)

	Wait()
}

Scheduler will schedule tasks.

type TaskFunc

type TaskFunc func(navvy.Task) navvy.Task

TaskFunc will be used create a new task.

type VoidWorkloader

type VoidWorkloader interface {
	VoidWorkload()
}

VoidWorkloader will not be included in Worker Pool.

Jump to

Keyboard shortcuts

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