standard

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parameter

type Parameter interface {
	// contains filtered or unexported methods
}

Parameter is the interface for service parameters.

func WithChainDB

func WithChainDB(chainDB chaindb.Service) Parameter

WithChainDB sets the chain database for this module.

func WithChainTime

func WithChainTime(chainTime chaintime.Service) Parameter

WithChainTime sets the chain time service for this module.

func WithETH2Client

func WithETH2Client(eth2Client eth2client.Service) Parameter

WithETH2Client sets the Ethereum 2 client for this module.

func WithLogLevel

func WithLogLevel(logLevel zerolog.Level) Parameter

WithLogLevel sets the log level for the module.

func WithStartEpoch

func WithStartEpoch(startEpoch int64) Parameter

WithStartEpoch sets the start epoch for this module.

type Service

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

Service is a chain database service.

func New

func New(ctx context.Context, params ...Parameter) (*Service, error)

New creates a new service.

func (*Service) OnBeaconChainHeadUpdated

func (s *Service) OnBeaconChainHeadUpdated(
	ctx context.Context,
	slot uint64,
	blockRoot []byte,
	stateRoot []byte,
	epochTransition bool,
)

OnBeaconChainHeadUpdated receives beacon chain head updated notifications.

Jump to

Keyboard shortcuts

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