processor

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2019 License: CC0-1.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queue

type Queue chan int64

Queue is a simple type alias for a (buffered) channel of block heights.

func NewQueue

func NewQueue(size int) Queue

type Worker

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

Worker defines a job consumer that is responsible for getting and aggregating block and associated data and exporting it to a database.

func NewWorker

func NewWorker(db *db.Database, cp client.ClientProxy, q Queue) Worker

func (Worker) Start

func (w Worker) Start()

Start starts a worker by listening for new jobs (block heights) from the given worker queue. Any failed job is logged and re-enqueued.

Jump to

Keyboard shortcuts

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