oracle

package
v0.4.31 Latest Latest
Warning

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

Go to latest
Published: May 15, 2020 License: GPL-3.0 Imports: 20 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 {
	Oracle     oracleConfig       `yaml:"oracle"`
	Log        logging.Config     `yaml:"log"`
	Blockchain *blockchain.Config `yaml:"blockchain"`
	Eth        accounts.EthConfig `yaml:"ethereum" required:"false"`
}

func NewConfig

func NewConfig(path string) (*Config, error)

type Oracle

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

func NewOracle

func NewOracle(ctx context.Context, log *zap.Logger, cfg *Config) (*Oracle, error)

func (*Oracle) Serve

func (o *Oracle) Serve(ctx context.Context) error

func (*Oracle) SetPrice

func (o *Oracle) SetPrice(ctx context.Context) error

type PriceData

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

type PriceWatcher

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

func NewPriceWatcher

func NewPriceWatcher(parsePeriod time.Duration) *PriceWatcher

func (*PriceWatcher) Start

func (p *PriceWatcher) Start(ctx context.Context) <-chan *PriceData

Jump to

Keyboard shortcuts

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