v2

package
v0.33.0-dev2 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

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 added in v0.32.4

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 added in v0.32.4

func NopMetrics() *Metrics

NopMetrics returns no-op Metrics.

func PrometheusMetrics added in v0.32.4

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

Can we burn in the routine name here?

type PeerByID added in v0.33.0

type PeerByID []p2p.ID

PeerByID is a list of peers sorted by peerID.

func (PeerByID) Len added in v0.33.0

func (peers PeerByID) Len() int

func (PeerByID) Less added in v0.33.0

func (peers PeerByID) Less(i, j int) bool

func (PeerByID) Swap added in v0.33.0

func (peers PeerByID) Swap(i, j int)

type Reactor added in v0.32.4

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

func NewReactor added in v0.32.4

func NewReactor(bufferSize int) *Reactor

func (*Reactor) AddPeer added in v0.32.4

func (r *Reactor) AddPeer()

func (*Reactor) Receive added in v0.32.4

func (r *Reactor) Receive(event Event)

func (*Reactor) Start added in v0.32.4

func (r *Reactor) Start()

func (*Reactor) Stop added in v0.32.4

func (r *Reactor) Stop()

type Routine added in v0.32.4

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 `stop()` 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