cache

package
v0.0.0-...-7f9a81d Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

Cache holds Redis client and log state.

func New

func New(addr string) (*Cache, error)

New initializes a new cache client.

func (*Cache) Clear

func (c *Cache) Clear(repo string) error

Clear deletes all cache entries relevant to a GoLang repo.

func (*Cache) GetDOT

func (c *Cache) GetDOT(repo string, cluster bool) (string, error)

GetDOT gets a DOT for a repo.

func (*Cache) GetSVG

func (c *Cache) GetSVG(repo string, cluster bool) (string, error)

GetSVG gets an SVG for a repo.

func (*Cache) RepoScoreIncr

func (c *Cache) RepoScoreIncr(repo string)

RepoScoreIncr increments the popularity score for a repo.

func (*Cache) RepoScores

func (c *Cache) RepoScores() ([]string, error)

RepoScores returns the top-10 most popular repos

func (*Cache) SetDOT

func (c *Cache) SetDOT(repo string, cluster bool, dot string)

SetDOT sets a DOT for a repo.

func (*Cache) SetSVG

func (c *Cache) SetSVG(repo string, cluster bool, svg string)

SetSVG sets an SVG for a repo.

Jump to

Keyboard shortcuts

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