cache

package
v0.0.0-...-3b41684 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2019 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
}

func NewCache

func NewCache(sources []Source, size int, maxAge time.Duration) (*Cache, error)

func (*Cache) Collect

func (c *Cache) Collect(ctx context.Context) (map[int]prommodel.Vector, error)

func (*Cache) NewSources

func (c *Cache) NewSources(sources []Source) (map[int]prommodel.Vector, error)

type Source

type Source struct {
	SourceID int    `json:"id"`
	URL      string `json:"sourceURL"`
	Query    string `json:"query"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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