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

cache

package
v1.26.4 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadOrRebuild

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

Types

type Cache

type Cache interface {
	registry.GRPCQuery

	CheckIntegrity(fbc fs.FS) error
	Build(fbc fs.FS) error
	Load() error
}

func New

func New(cacheDir string) (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. It returns an error if cacheDir exists and contains unexpected files.

type JSON

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

func NewJSON

func NewJSON(baseDir string) *JSON

func (*JSON) Build

func (q *JSON) Build(fbcFsys fs.FS) error

func (*JSON) CheckIntegrity

func (q *JSON) CheckIntegrity(fbcFsys fs.FS) error

func (*JSON) GetBundle

func (q *JSON) GetBundle(_ context.Context, pkgName, channelName, csvName string) (*api.Bundle, error)

func (*JSON) GetBundleForChannel

func (q *JSON) GetBundleForChannel(ctx context.Context, pkgName string, channelName string) (*api.Bundle, error)

func (*JSON) GetBundleThatProvides

func (q *JSON) GetBundleThatProvides(ctx context.Context, group, version, kind string) (*api.Bundle, error)

func (*JSON) GetBundleThatReplaces

func (q *JSON) GetBundleThatReplaces(ctx context.Context, name, pkgName, channelName string) (*api.Bundle, error)

func (*JSON) GetChannelEntriesThatProvide

func (q *JSON) GetChannelEntriesThatProvide(ctx context.Context, group, version, kind string) ([]*registry.ChannelEntry, error)

func (JSON) GetChannelEntriesThatReplace

func (pkgs JSON) GetChannelEntriesThatReplace(_ context.Context, name string) ([]*registry.ChannelEntry, error)

func (*JSON) GetLatestChannelEntriesThatProvide

func (q *JSON) GetLatestChannelEntriesThatProvide(ctx context.Context, group, version, kind string) ([]*registry.ChannelEntry, error)

func (JSON) GetPackage

func (pkgs JSON) GetPackage(_ context.Context, name string) (*registry.PackageManifest, error)

func (*JSON) ListBundles

func (q *JSON) ListBundles(ctx context.Context) ([]*api.Bundle, error)

func (JSON) ListPackages

func (pkgs JSON) ListPackages(_ context.Context) ([]string, error)

func (*JSON) Load

func (q *JSON) Load() error

func (*JSON) SendBundles

func (q *JSON) SendBundles(_ context.Context, s registry.BundleSender) error

Jump to

Keyboard shortcuts

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