taskrunner

package module
v0.0.0-...-a374b46 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2019 License: MIT Imports: 5 Imported by: 0

README

Build Status

taskrunner

This Project if under development and is meant to provide control over goroutines in order to stop or provide meta at runtime

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorKeyAlreadyExistInMeta = errors.New("key already exist in meta")
	ErrorKeyDidNotExistInMeta  = errors.New("key is not present in meta")
)
View Source
var (
	ErrorTaskManagerIsHalted = errors.New("task manager is shutting down")
)

Functions

This section is empty.

Types

type Task

type Task interface {
	RemoveMeta(key string) error
	AddMeta(key string, val interface{}) error
	GetMeta(key string) (val interface{}, ok bool)

	Cancel()
	// contains filtered or unexported methods
}

type TaskManager

type TaskManager interface {
	GO(ctx context.Context, fn runnable) (taskId string, err error)
	RestartTasksFromMetaKey(key string) (count int, err error)
	CancelTaskFromMetaKey(key string) (count int, err error)
	FindFromMetaKey(key string) (tasks []Task)
	IsOpen() bool
	GetTasksCount() int
}

func NewTaskManager

func NewTaskManager() TaskManager

Jump to

Keyboard shortcuts

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