cache

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 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, repoSyncFrequency time.Duration, useGitCaBundle bool, opts CacheOptions) *Cache

func (*Cache) CloseRepository

func (c *Cache) CloseRepository(repositorySpec *configapi.Repository, allRepos []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