cache

package
v0.0.0-...-c7d747a Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 22 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 struct {
	// contains filtered or unexported fields
}

Cache allows us to keep state for repositories, rather than querying them every time.

Cache Structure: <cacheDir>/git/ * Caches bare git repositories in directories named based on the repository address. <cacheDir>/oci/ * Caches oci images with further hierarchy underneath * We Cache image layers in <cacheDir>/oci/layers/ (this might be obsolete with the flattened Cache) * We Cache flattened tar files in <cacheDir>/oci/ (so we don't need to pull to read resources) * We poll the repositories (every minute) and Cache the discovered images in memory.

func NewCache

func NewCache(cacheDir string, opts CacheOptions) *Cache

func (*Cache) CloseRepository

func (c *Cache) CloseRepository(repositorySpec *configapi.Repository) error

func (*Cache) OpenRepository

func (c *Cache) OpenRepository(ctx context.Context, repositorySpec *configapi.Repository) (*cachedRepository, error)

type CacheOptions

type CacheOptions struct {
	CredentialResolver repository.CredentialResolver
	UserInfoProvider   repository.UserInfoProvider
	MetadataStore      meta.MetadataStore
	ObjectNotifier     objectNotifier
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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