feed

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const LoggerTag = "FEED"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// DataModels is a list of data models handled by the Feed.
	DataModels []string

	// DataProvider is a data provider which is used to fetch data points.
	DataProvider datapoint.Provider

	// Signers is a list of signers used to sign data points.
	Signers []datapoint.Signer

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

	// Interval describes how often data points should be sent to the network.
	Interval *timeutil.Ticker

	// Logger is a current logger interface used by the Feed.
	// If nil, null logger will be used.
	Logger log.Logger
}

Config is the configuration for the Feed.

type Feed

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

Feed is a service which periodically fetches data points and then sends them to the network using transport layer.

func New

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

New creates a new instance of the Feed.

func (*Feed) Start

func (f *Feed) Start(ctx context.Context) error

Start implements the supervisor.Service interface.

func (*Feed) Wait

func (f *Feed) 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