v2

package
v0.0.0-...-b8a9776 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2019 License: Apache-2.0, Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

nolint:unused

Index

Constants

View Source
const (
	// MetricsSubsystem is a subsystem shared by all metrics exposed by this
	// package.
	MetricsSubsystem = "blockchain"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event queue.Item

type Metrics

type Metrics struct {
	// events_in
	EventsIn metrics.Counter
	// events_in
	EventsHandled metrics.Counter
	// events_out
	EventsOut metrics.Counter
	// errors_in
	ErrorsIn metrics.Counter
	// errors_handled
	ErrorsHandled metrics.Counter
	// errors_out
	ErrorsOut metrics.Counter
	// events_shed
	EventsShed metrics.Counter
	// events_sent
	EventsSent metrics.Counter
	// errors_sent
	ErrorsSent metrics.Counter
	// errors_shed
	ErrorsShed metrics.Counter
}

Metrics contains metrics exposed by this package.

func NopMetrics

func NopMetrics() *Metrics

NopMetrics returns no-op Metrics.

func PrometheusMetrics

func PrometheusMetrics(namespace string, labelsAndValues ...string) *Metrics

Can we burn in the routine name here?

type Reactor

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

func NewReactor

func NewReactor(bufferSize int) *Reactor

func (*Reactor) AddPeer

func (r *Reactor) AddPeer()

func (*Reactor) Receive

func (r *Reactor) Receive(event Event)

func (*Reactor) Start

func (r *Reactor) Start()

func (*Reactor) Stop

func (r *Reactor) Stop()

type Routine

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

Routines are a structure which model a finite state machine as serialized stream of events processed by a handle function. This Routine structure handles the concurrency and messaging guarantees. Events are sent via `send` are handled by the `handle` function to produce an iterator `next()`. Calling `close()` on a routine will conclude processing of all sent events and produce `final()` event representing the terminal state.

Jump to

Keyboard shortcuts

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