types

package
v1.10.17 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HeadBroadcaster

type HeadBroadcaster interface {
	service.Service
	HeadTrackable
	Subscribe(callback HeadTrackable) (currentLongestChain *eth.Head, unsubscribe func())
}

HeadBroadcaster is the external interface of headBroadcaster

type HeadBroadcasterRegistry

type HeadBroadcasterRegistry interface {
	Subscribe(callback HeadTrackable) (currentLongestChain *eth.Head, unsubscribe func())
}

type HeadTrackable

type HeadTrackable interface {
	OnNewLongestChain(ctx context.Context, head eth.Head)
}

HeadTrackable represents any object that wishes to respond to ethereum events, after being subscribed to HeadBroadcaster

type SubscribeFunc added in v1.10.17

type SubscribeFunc func(callback HeadTrackable) (unsubscribe func())

type Tracker

type Tracker interface {
	HighestSeenHeadFromDB(context.Context) (*eth.Head, error)
	Start() error
	Stop() error
	SetLogLevel(lvl zapcore.Level)
	Ready() error
	Healthy() error
}

Jump to

Keyboard shortcuts

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