geth

package
v0.0.0-...-8fb26ab Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRPCClient

func NewRPCClient(url string) (*ethclient.Client, error)

func NewWebsocketClient

func NewWebsocketClient(ctx context.Context, url string) (*ethclient.Client, error)

Types

type EventHandler

type EventHandler interface {
	Handle([]types.Log)
}

this is an area of improvement since we should have knowledge about what logs are relevant

type HeaderProcessor

type HeaderProcessor interface {
	ProcessHead(ctx context.Context, header *types.Header) error
}

type HeaderReceiver

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

this is an area of improvement, as we could handle multiple filters

func NewHeaderReceiver

func NewHeaderReceiver(c *ethclient.Client, timeout time.Duration) *HeaderReceiver

func (*HeaderReceiver) Receive

func (h *HeaderReceiver) Receive(ctx context.Context, handler EventHandler, header <-chan *types.Header)

type WSConnectionManager

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

func NewWSConnectionManager

func NewWSConnectionManager(wsURL string) *WSConnectionManager

func (*WSConnectionManager) ManageHeaderConnection

func (m *WSConnectionManager) ManageHeaderConnection(ctx context.Context, header chan<- *types.Header)

Jump to

Keyboard shortcuts

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