Help us shape the future of Go! Take the 2026 Go Developer Survey

cache

package
v1.44.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: Apache-2.0 Imports: 27 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadOrRebuild

func LoadOrRebuild(ctx context.Context, c Cache, fbc fs.FS) error

Types

type Cache

type Cache interface {
	registry.GRPCQuery

	CheckIntegrity(ctx context.Context, fbc fs.FS) error
	Build(ctx context.Context, fbc fs.FS) error
	Load(ctc context.Context) error
	Close() error
}

func New

func New(cacheDir string, cacheOpts ...CacheOption) (Cache, error)

New creates a new Cache. It chooses a cache implementation based on the files it finds in the cache directory, with a preference for the latest iteration of the cache implementation. If the cache directory is non-empty and a supported cache format is not found, an error is returned.

type CacheOption added in v1.41.0

type CacheOption func(*CacheOptions)

func WithLog added in v1.41.0

func WithLog(log *logrus.Entry) CacheOption

type CacheOptions added in v1.41.0

type CacheOptions struct {
	Log *logrus.Entry
}

Jump to

Keyboard shortcuts

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