worker

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2015 License: MIT Imports: 10 Imported by: 0

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