lunarcrush

package
v0.0.0-...-695090a Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LunarCache

type LunarCache struct {
	Logger *zap.SugaredLogger
	Config config.LunarCrushAPI

	Blacklist map[string]bool
	// contains filtered or unexported fields
}

LunarCache contains logic necessary to cache lunarcrush data.

func (*LunarCache) GetByAltRank

func (cache *LunarCache) GetByAltRank(validPairs map[string][]string, quoteCurrency string, max int) []string

GetByAltRank Will return max pairs as sorted by GalaxyScore. All pairs returned must exist in the "validPairs" list

func (*LunarCache) GetByGalaxyScore

func (cache *LunarCache) GetByGalaxyScore(validPairs map[string][]string, quoteCurrency string, max int) []string

GetByGalaxyScore Will return max pairs as sorted by GalaxyScore. All pairs returned must exist in the "validPairs" list

func (*LunarCache) UpdateCache

func (cache *LunarCache) UpdateCache()

UpdateCache Updates the cache with the latest data. Note, if the endpoint is unavailable, the cache will block for 5 seconds and try again

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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