fetcher

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2022 License: GPL-3.0 Imports: 6 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(eth2Svc eth2client.Service) (*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 the AggSigDB. Note: This is not thread safe should 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