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 *models.Head, unsubscribe func()) }
HeadBroadcaster is the external interface of headBroadcaster
type HeadBroadcasterRegistry ¶
type HeadBroadcasterRegistry interface {
Subscribe(callback HeadTrackable) (currentLongestChain *models.Head, unsubscribe func())
}
type HeadTrackable ¶
type HeadTrackable interface { Connect(head *models.Head) error OnNewLongestChain(ctx context.Context, head models.Head) }
HeadTrackable represents any object that wishes to respond to ethereum events, after being subscribed to HeadBroadcaster
type HeadTrackableCallback ¶
type HeadTrackableCallback struct {
OnConnect func() error
}
HeadTrackableCallback is a simple wrapper around an On Connect callback
func (*HeadTrackableCallback) OnNewLongestChain ¶
func (c *HeadTrackableCallback) OnNewLongestChain(context.Context, models.Head)
Click to show internal directories.
Click to hide internal directories.