Documentation ¶
Index ¶
Constants ¶
View Source
const LoggerTag = "SPECTRE"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Signer ethereum.Signer // Datastore provides prices for Spectre. Datastore Datastore // Interval describes how often we should try to update Oracles. Interval time.Duration // Pairs is the list supported pairs by Spectre with their configuration. Pairs []*Pair // Logger is a current logger interface used by the Spectre. The Logger is // required to monitor asynchronous processes. Logger log.Logger }
type Datastore ¶
type Datastore interface { Prices() *datastore.PriceStore Start() error Stop() error }
type Pair ¶
type Pair struct { // AssetPair is the name of asset pair, e.g. ETHUSD. AssetPair string // OracleSpread is the minimum spread between the Oracle price and new price // required to send update. OracleSpread float64 // OracleExpiration is the minimum time difference between the Oracle time // and current time required to send an update. OracleExpiration time.Duration // PriceExpiration is the maximum amount of time before price received // from the feeder will be considered as expired. PriceExpiration time.Duration // Median is the instance of the oracle.Median which is the interface for // the Oracle contract. Median oracle.Median }
Click to show internal directories.
Click to hide internal directories.