statefeed

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2019 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BlockProcessed is sent after a block has been processed and updated the state database.
	BlockProcessed = iota + 1
	// ChainStarted is sent when enough validators are active to start proposing blocks.
	ChainStarted
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockProcessedData

type BlockProcessedData struct {
	// BlockHash is the hash of the processed block.
	BlockRoot [32]byte
	// Verified is true if the block's BLS contents have been verified.
	Verified bool
}

BlockProcessedData is the data sent with BlockProcessed events.

type ChainStartedData

type ChainStartedData struct {
	// StartTime is the time at which the chain started.
	StartTime time.Time
}

ChainStartedData is the data sent with ChainStarted events.

type Event

type Event struct {
	// Type is the type of event.
	Type EventType
	// Data is event-specific data.
	Data interface{}
}

Event is the event that is sent with state feed updates.

type EventType

type EventType int

EventType is the type that defines the type of event.

type Notifier

type Notifier interface {
	StateFeed() *event.Feed
}

Notifier interface defines the methods of the service that provides state updates to consumers.

Jump to

Keyboard shortcuts

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