Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefaultHeadListenerSubscriptionError ¶
NewDefaultHeadListenerSubscriptionError is raised when the DefaultHeadListener fails to subscribe to new head events via its client.BeaconAPI.
Types ¶
type DefaultHeadListener ¶
type DefaultHeadListener struct {
// contains filtered or unexported fields
}
DefaultHeadListener is the implementation of the HeadListener for agate, using the client.BeaconAPI as a way to listen for new heads.
func NewDefaultHeadListener ¶
func NewDefaultHeadListener() *DefaultHeadListener
NewDefaultHeadListener creates an empty and non-initialized DefaultHeadListener.
func (*DefaultHeadListener) Init ¶
func (listener *DefaultHeadListener) Init(beaconAPIClient client.BeaconAPI)
Init initializes a new DefaultHeadListener using a client.BeaconAPI to listen to new head events.
type HeadListener ¶
type HeadListener interface { // Listen starts the listening process in the background and populates the headEvents channel // with new head events as they arrive. Listen(ctx context.Context, headEvents chan<- *v1.HeadEvent) error }
HeadListener is used to listen to head events on the Ethereum beacon chain.
Click to show internal directories.
Click to hide internal directories.