monitor

package
v0.0.0-...-f764b3d Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Stopped = iota
	Running
	Failed
	Completed
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DiscretWork

type DiscretWork interface {
	DoWork() (bool, error)
	GetProgress() interface{}
	BeforeRun() error
	AfterStop() error
}

type MonitoredWorker

type MonitoredWorker struct {
	Itw DiscretWork
	// contains filtered or unexported fields
}

func (*MonitoredWorker) GetId

func (mw *MonitoredWorker) GetId() string

func (MonitoredWorker) GetProgress

func (mw MonitoredWorker) GetProgress() interface{}

func (MonitoredWorker) GetState

func (mw MonitoredWorker) GetState() int

func (*MonitoredWorker) Start

func (mw *MonitoredWorker) Start() error

func (*MonitoredWorker) Stop

func (mw *MonitoredWorker) Stop() error

func (*MonitoredWorker) Wait

func (mw *MonitoredWorker) Wait()

type WorkerPool

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

func (*WorkerPool) AppendWork

func (wp *WorkerPool) AppendWork(iv *MonitoredWorker)

func (*WorkerPool) GetAllProgress

func (wp *WorkerPool) GetAllProgress() interface{}

func (*WorkerPool) StartAll

func (wp *WorkerPool) StartAll() []error

func (*WorkerPool) StopAll

func (wp *WorkerPool) StopAll() []error

Jump to

Keyboard shortcuts

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