fetcher

package
v0.0.0-...-3df06e7 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host       string
	APIToken   string
	RPS        int
	StartRound *uint64
	Processor  ProcessorFunc
}

Config represents a configuration

type Fetcher

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

Fetcher handles block fetching from algod or indexer

func New

func New(conf Config) (*Fetcher, error)

New creates a new fetcher

func (*Fetcher) Start

func (f *Fetcher) Start()

Start starts fetching data from the blockchain

func (*Fetcher) Stop

func (f *Fetcher) Stop()

Stop stops the fetcher

type ProcessorFunc

type ProcessorFunc func(*models.Block)

ProcessorFunc represents a processor function that consume blocks

Jump to

Keyboard shortcuts

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