Versions in this module Expand all Collapse all v1 v1.0.2 May 13, 2021 v1.0.0 Feb 1, 2021 Changes in this version + const GWEI + var PSRs = map[int]ValueGenerator + func ExpDecay(x float64) (float64, float64) + func InitPSRs() error + func LinearDecay(x float64) (float64, float64) + func ManualEntry(apis []*IndexTracker, at time.Time) (apiOracle.PriceInfo, float64) + func Mean(vals []apiOracle.PriceInfo) apiOracle.PriceInfo + func MeanAt(apis []*IndexTracker, at time.Time) (apiOracle.PriceInfo, float64) + func Median(values []apiOracle.PriceInfo) apiOracle.PriceInfo + func MedianAt(apis []*IndexTracker, at time.Time) (apiOracle.PriceInfo, float64) + func MedianAtEOD(apis []*IndexTracker, at time.Time) (apiOracle.PriceInfo, float64) + func NoDecay(x float64) (float64, float64) + func PSRValueForTime(requestID int, at time.Time) (float64, float64) + func UpdatePSRs(ctx context.Context, updatedSymbols []string) error + func VolumeWeightedAvg(vals []apiOracle.PriceInfo) apiOracle.PriceInfo + type Ampl struct + func (a Ampl) Require(at time.Time) map[string]IndexProcessor + func (a Ampl) ValueAt(vals map[string]apiOracle.PriceInfo, at time.Time) float64 + type BalanceTracker struct + func (b *BalanceTracker) Exec(ctx context.Context) error + func (b *BalanceTracker) String() string + type ChainedPrice struct + type CurrentVariablesTracker struct + func (b *CurrentVariablesTracker) Exec(ctx context.Context) error + func (b *CurrentVariablesTracker) String() string + type DataSource interface + Get func() ([]byte, error) + type DisputeTracker struct + func (b *DisputeTracker) Exec(ctx context.Context) error + func (b *DisputeTracker) String() string + type FetchRequest struct + type GasPriceModel struct + Average float32 + Fast float32 + Fastest float32 + type GasTracker struct + func (b *GasTracker) Exec(ctx context.Context) error + func (b *GasTracker) String() string + type IndexProcessor func([]*IndexTracker, time.Time) (apiOracle.PriceInfo, float64) + func AmpleChained(chainedPair string) IndexProcessor + func TimeWeightedAvg(interval time.Duration, weightFn func(float64) (float64, float64)) IndexProcessor + func VolumeWeightedAPIs(processor IndexProcessor) IndexProcessor + type IndexTracker struct + Args [][]string + Identifier string + Name string + Source DataSource + Symbols []string + func (i *IndexTracker) Exec(ctx context.Context) error + func (i *IndexTracker) String() string + type JSONapi struct + Request *FetchRequest + func (j *JSONapi) Get() ([]byte, error) + type JSONfile struct + func (j *JSONfile) Get() ([]byte, error) + type NewCurrentVariablesTracker struct + func (b *NewCurrentVariablesTracker) Exec(ctx context.Context) error + func (b *NewCurrentVariablesTracker) String() string + type Runner struct + func NewRunner(client rpc.ETHClient, db db.DB) (*Runner, error) + func (r *Runner) Ready() chan bool + func (r *Runner) Start(ctx context.Context, exitCh chan int) error + type SingleSymbol struct + func (s SingleSymbol) Require(at time.Time) map[string]IndexProcessor + func (s SingleSymbol) ValueAt(vals map[string]apiOracle.PriceInfo, at time.Time) float64 + type TimeOutTracker struct + func (b *TimeOutTracker) Exec(ctx context.Context) error + func (b *TimeOutTracker) String() string + type TimedSwitch struct + func (t *TimedSwitch) Require(at time.Time) map[string]IndexProcessor + func (t *TimedSwitch) ValueAt(vals map[string]apiOracle.PriceInfo, at time.Time) float64 + type Tracker interface + Exec func(ctx context.Context) error + String func() string + func BuildIndexTrackers() ([]Tracker, error) + type TributeTracker struct + func (b *TributeTracker) Exec(ctx context.Context) error + func (b *TributeTracker) String() string + type ValueCheckResult struct + Datapoints []float64 + High float64 + Low float64 + Times []time.Time + WithinRange bool + func CheckValueAtTime(reqID uint64, val *big.Int, at time.Time) *ValueCheckResult + type ValueGenerator interface + Require func(time.Time) map[string]IndexProcessor + ValueAt func(map[string]apiOracle.PriceInfo, time.Time) float64