worker

package
v0.2.2-buildfails Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2015 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

TODO FIXME name me

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	NumWorkers:       1,
	ClientBufferSize: 0,
	WorkerBufferSize: 0,
}

Functions

This section is empty.

Types

type BlockList

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

func (*BlockList) Len

func (s *BlockList) Len() int

func (*BlockList) Pop

func (s *BlockList) Pop() *blocks.Block

func (*BlockList) Push

func (s *BlockList) Push(b *blocks.Block)

func (*BlockList) PushFront

func (s *BlockList) PushFront(b *blocks.Block)

type Config

type Config struct {
	// NumWorkers sets the number of background workers that provide blocks to
	// the exchange.
	NumWorkers int

	// ClientBufferSize allows clients of HasBlock to send up to
	// |ClientBufferSize| blocks without blocking.
	ClientBufferSize int

	// WorkerBufferSize can be used in conjunction with NumWorkers to reduce
	// communication-coordination within the worker.
	WorkerBufferSize int
}

type Worker

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

TODO FIXME name me

func NewWorker

func NewWorker(e exchange.Interface, c Config) *Worker

func (*Worker) Close

func (w *Worker) Close() error

func (*Worker) HasBlock

func (w *Worker) HasBlock(b *blocks.Block) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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