cache

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

func New

func New(ctx context.Context, cacheConf config.Cache) (DB, error)

func (DB) Close

func (db DB) Close()

func (DB) GetCurrencies added in v0.26.0

func (db DB) GetCurrencies(base currency.Currency, engs []engines.Name) (currency.Currencies, error)

func (DB) GetCurrenciesTTL added in v0.26.0

func (db DB) GetCurrenciesTTL(base currency.Currency, engs []engines.Name) (time.Duration, error)

func (DB) SetCurrencies added in v0.26.0

func (db DB) SetCurrencies(base currency.Currency, engs []engines.Name, currencies currency.Currencies, ttl ...time.Duration) error

type Driver

type Driver interface {
	Close()
	Set(k string, v any, ttl ...time.Duration) error
	Get(k string, o any) error
	GetTTL(k string) (time.Duration, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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