feeder

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const LoggerTag = "FEEDER"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Pairs is a list supported pairs in the format "QUOTE/BASE".
	Pairs []string

	// PriceProvider is a price provider which is used to fetch prices.
	PriceProvider provider.Provider

	// Signer is a wallet used to sign prices.
	Signer wallet.Key

	// Transport is an implementation of transport used to send prices to
	// the network.
	Transport transport.Transport

	// Interval describes how often we should send prices to the network.
	Interval *timeutil.Ticker

	// Logger is a current logger interface used by the Feeder.
	Logger log.Logger
}

Config is the configuration for the Feeder.

type Feeder

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

Feeder is a service which periodically fetches prices and then sends them to the Oracle network using transport layer. TODO(mdobak): Rename to Feed.

func New

func New(cfg Config) (*Feeder, error)

New creates a new instance of the Feeder.

func (*Feeder) Start

func (g *Feeder) Start(ctx context.Context) error

Start implements the supervisor.Service interface.

func (*Feeder) Wait

func (g *Feeder) Wait() <-chan error

Wait implements the supervisor.Service interface.

Jump to

Keyboard shortcuts

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