Documentation ¶
Index ¶
Constants ¶
View Source
const LoggerTag = "DATASTORE"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Signer is an instance of the ethereum.Signer which will be used to // verify price signatures. Signer ethereum.Signer // Transport is a implementation of transport used to fetch prices from // feeders. Transport transport.Transport // Pairs is the list supported pairs by the datastore with their // configuration. Pairs map[string]*Pair // Logger is a current logger interface used by the Datastore. // The Logger is required to monitor asynchronous processes. Logger log.Logger }
type Datastore ¶
type Datastore struct {
// contains filtered or unexported fields
}
Datastore reads and stores prices from the P2P network.
func NewDatastore ¶
func (*Datastore) Prices ¶
func (c *Datastore) Prices() datastore.PriceStore
Prices implements the datastore.Datastore interface.
type PriceStore ¶
type PriceStore struct {
// contains filtered or unexported fields
}
PriceStore contains a list of messages.Price's.
func (*PriceStore) Add ¶
func (p *PriceStore) Add(from ethereum.Address, msg *messages.Price)
Add implements the datastore.PriceStore interface.
func (*PriceStore) All ¶
func (p *PriceStore) All() map[datastore.FeederPrice]*messages.Price
All implements the datastore.PriceStore interface.
Click to show internal directories.
Click to hide internal directories.