cache

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fetcher

type Fetcher[T any] interface {
	GetLastModified(ctx context.Context) (time.Time, error)
	Fetch(ctx context.Context) (T, error)
	GetTarget() string
}

type SciensanoCache

type SciensanoCache struct {
	Cases            cacher[sciensano.Cases]
	Hospitalisations cacher[sciensano.Hospitalisations]
	Mortalities      cacher[sciensano.Mortalities]
	TestResults      cacher[sciensano.TestResults]
	Vaccinations     cacher[sciensano.Vaccinations]
	// contains filtered or unexported fields
}

func NewSciensanoCache

func NewSciensanoCache(target string) *SciensanoCache

func (*SciensanoCache) AutoRefresh

func (c *SciensanoCache) AutoRefresh(ctx context.Context, interval time.Duration)

func (*SciensanoCache) Collect

func (c *SciensanoCache) Collect(metrics chan<- prometheus.Metric)

func (*SciensanoCache) Describe

func (c *SciensanoCache) Describe(descs chan<- *prometheus.Desc)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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