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
Click to show internal directories.
Click to hide internal directories.