fetcher

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fetcher

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

Fetcher fetches proposed duty data.

func New

func New(eth2Cl eth2wrap.Client, feeRecipientAddress string) (*Fetcher, error)

New returns a new fetcher instance.

func (*Fetcher) Fetch

func (f *Fetcher) Fetch(ctx context.Context, duty core.Duty, defSet core.DutyDefinitionSet) error

Fetch triggers fetching of a proposed duty data set.

func (*Fetcher) RegisterAggSigDB

func (f *Fetcher) RegisterAggSigDB(fn func(context.Context, core.Duty, core.PubKey) (core.SignedData, error))

RegisterAggSigDB registers a function to get resolved aggregated signed data from AggSigDB. Note: This is not thread safe and should only be called *before* Fetch.

func (*Fetcher) RegisterAwaitAttData added in v0.10.1

func (f *Fetcher) RegisterAwaitAttData(fn func(ctx context.Context, slot int64, commIdx int64) (*eth2p0.AttestationData, error))

RegisterAwaitAttData registers a function to get attestation data from DutyDB. Note: This is not thread safe and should only be called *before* Fetch.

func (*Fetcher) Subscribe

func (f *Fetcher) Subscribe(fn func(context.Context, core.Duty, core.UnsignedDataSet) error)

Subscribe registers a callback for fetched duties. Note this is not thread safe should be called *before* Fetch.

Jump to

Keyboard shortcuts

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