tendermint: github.com/tendermint/tendermint/blockchain/v2 Index | Files

package v2

import "github.com/tendermint/tendermint/blockchain/v2"


Package Files

metrics.go processor.go processor_context.go reactor.go routine.go scheduler.go types.go


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

type Event Uses

type Event queue.Item

type Metrics Uses

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 Uses

func NopMetrics() *Metrics

NopMetrics returns no-op Metrics.

func PrometheusMetrics Uses

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

Can we burn in the routine name here?

type PeerByID Uses

type PeerByID []p2p.ID

PeerByID is a list of peers sorted by peerID.

func (PeerByID) Len Uses

func (peers PeerByID) Len() int

func (PeerByID) Less Uses

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

func (PeerByID) Swap Uses

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

type Reactor Uses

type Reactor struct {
    // contains filtered or unexported fields

func NewReactor Uses

func NewReactor(bufferSize int) *Reactor

func (*Reactor) AddPeer Uses

func (r *Reactor) AddPeer()

func (*Reactor) Receive Uses

func (r *Reactor) Receive(event Event)

func (*Reactor) Start Uses

func (r *Reactor) Start()

func (*Reactor) Stop Uses

func (r *Reactor) Stop()

type Routine Uses

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.

Package v2 imports 16 packages (graph). Updated 2019-12-09. Refresh now. Tools for package owners.