metafilters

package
v1.4.131-rc-1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RemoveOutliers

func RemoveOutliers(samples []float64, scale float64) ([]float64, []int)

Types

type FilterAIR

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

func NewFilterAIR

func NewFilterAIR(asset dia.Asset, source string, childFilter string, currentTime time.Time, memory int) *FilterAIR

NewFilterAIR returns a FilterAIR

func (*FilterAIR) Collect

func (filter *FilterAIR) Collect(filterPoint dia.PairFilterPoint, starttime time.Time, endtime time.Time)

func (*FilterAIR) FilterPointForBlock

func (filter *FilterAIR) FilterPointForBlock() *dia.MetaFilterPoint

func (*FilterAIR) FinalCompute

func (filter *FilterAIR) FinalCompute(t time.Time) float64

type FilterCOUNT

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

func NewFilterCOUNT

func NewFilterCOUNT(asset dia.Asset, source string, childFilter string, memory int) *FilterCOUNT

func (*FilterCOUNT) Collect

func (filter *FilterCOUNT) Collect(filterPoint dia.PairFilterPoint, starttime time.Time, endtime time.Time)

func (*FilterCOUNT) FilterPointForBlock

func (filter *FilterCOUNT) FilterPointForBlock() *dia.MetaFilterPoint

func (*FilterCOUNT) FinalCompute

func (filter *FilterCOUNT) FinalCompute(t time.Time)

type FilterTLT

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

func NewFilterTLT

func NewFilterTLT(asset dia.Asset, source string, childFilter string, memory int) *FilterTLT

type FilterVOL

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

func NewFilterVOL

func NewFilterVOL(asset dia.Asset, exchange string, childFilter string, memory int) *FilterVOL

func (*FilterVOL) Collect

func (filter *FilterVOL) Collect(filterPoint dia.PairFilterPoint, starttime time.Time, endtime time.Time)

func (*FilterVOL) FilterPointForBlock

func (filter *FilterVOL) FilterPointForBlock() *dia.MetaFilterPoint

func (*FilterVOL) FinalCompute

func (filter *FilterVOL) FinalCompute(t time.Time)

type MetaFilter

type MetaFilter interface {
	// contains filtered or unexported methods
}

Filter interface defines a filter's methods processing trades from the tradesBlockService.

type MetaFilterService

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

FiltersBlockService is the data structure containing all objects necessary for the processing of a tradesBlock.

func NewMetaFilterService

func NewMetaFilterService(datastore models.Datastore, chanFiltersBlock chan *dia.FiltersBlock) *MetaFilterService

NewFiltersBlockService returns a new FiltersBlockService and runs mainLoop() in a go routine.

func (*MetaFilterService) Close

func (s *MetaFilterService) Close() error

Close gracefully closes the Filtersblockservice

func (*MetaFilterService) ProcessFiltersBlock

func (s *MetaFilterService) ProcessFiltersBlock(filtersBlock *dia.FiltersBlock)

ProcessFiltersBlock sends a filled fitlersBlock into the filtersBlock channel.

Jump to

Keyboard shortcuts

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