datastore

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Datastore

type Datastore interface {
	Start() error
	Wait() chan error
	Prices() PriceStore
}

type FeederPrice

type FeederPrice struct {
	AssetPair string
	Feeder    ethereum.Address
}

type PriceStore

type PriceStore interface {
	// Add adds a new price to the list. If a price from same feeder already
	// exists, the newer one will be used.
	Add(from ethereum.Address, msg *messages.Price)
	// All returns all prices.
	All() map[FeederPrice]*messages.Price
	// AssetPair returns all prices for given asset pair.
	AssetPair(assetPair string) []*messages.Price
	// Feeder returns the latest price for given asset pair sent by given feeder.
	Feeder(assetPair string, feeder ethereum.Address) *messages.Price
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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