cache

package
v1.4.2-celo-rc Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: AGPL-3.0 Imports: 11 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 interface {
	Add(context.Context, string) error
	Remove(context.Context, string) error
	Exists(context.Context, ...string) (bool, error)
	Size(context.Context) (int64, error)
}

func New

func New(o CacheOpts) (Cache, error)

func NewMapCache

func NewMapCache() Cache

func NewRedisCache

func NewRedisCache(o redisOpts) (Cache, error)

type CacheOpts

type CacheOpts struct {
	RedisDSN   string
	CacheType  string
	Registries []string
	Watchlist  []string
	Blacklist  []string
	Chain      chain.Chain
	Logg       *slog.Logger
}

Jump to

Keyboard shortcuts

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