testutils

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MedianAggregator

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

func NewMedianAggregator

func NewMedianAggregator() *MedianAggregator

NewMedianAggregator returns a new Median aggregator.

func (*MedianAggregator) AggregatePrices

func (m *MedianAggregator) AggregatePrices()

AggregatePrices inputs the aggregated prices from all providers and computes the median price for each asset.

func (*MedianAggregator) GetPrices

func (m *MedianAggregator) GetPrices() types.Prices

GetPrices returns the aggregated data the aggregator has.

func (*MedianAggregator) Reset

func (m *MedianAggregator) Reset()

Reset resets the data aggregator for all providers.

func (*MedianAggregator) SetProviderPrices

func (m *MedianAggregator) SetProviderPrices(provider string, data types.Prices)

SetProviderPrices updates the data aggregator with the given provider and data.

func (*MedianAggregator) UpdateMarketMap

func (m *MedianAggregator) UpdateMarketMap(_ mmtypes.MarketMap)

Jump to

Keyboard shortcuts

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