workerpool

package
v0.0.0-...-694507d Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var JobQueue chan Job

Functions

This section is empty.

Types

type Dispatcher

type Dispatcher struct {
	// A pool of worker channels.
	WorkerPool chan chan Job
}

func NewDispatcher

func NewDispatcher() *Dispatcher

func (*Dispatcher) Run

func (d *Dispatcher) Run()

type Job

type Job struct {
	Command *exec.Cmd
}

type Worker

type Worker struct {
	WorkerPool chan chan Job
	JobChannel chan Job
	// contains filtered or unexported fields
}

func NewWorker

func NewWorker(workerPool chan chan Job) Worker

func (Worker) Start

func (w Worker) Start()

func (Worker) Stop

func (w Worker) Stop()

Jump to

Keyboard shortcuts

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