cache

package
v0.20.3 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchFromRegistry

func FetchFromRegistry(ctx context.Context, p Provider) (io.ReadCloser, int64, error)

Types

type GCSStorage

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

func NewGCSStorage

func NewGCSStorage(token func(context.Context) (string, error), bucket, prefix string) *GCSStorage

func (*GCSStorage) Exists

func (g *GCSStorage) Exists(ctx context.Context, key string) (bool, error)

func (*GCSStorage) Get

func (g *GCSStorage) Get(ctx context.Context, key string) (io.ReadCloser, int64, error)

func (*GCSStorage) Put

func (g *GCSStorage) Put(ctx context.Context, key string, r io.Reader, size int64) error

type Provider

type Provider struct {
	Address string
	Version string
}

func ParseLockFile

func ParseLockFile(path string) ([]Provider, error)

type ProviderCache

type ProviderCache struct {
	Store       StorageBackend
	Registry    *RegistryClient
	CacheDir    string
	Version     string
	Parallelism int
}

func NewProviderCache

func NewProviderCache(store StorageBackend, cacheDir, version string) *ProviderCache

func (*ProviderCache) Save

func (c *ProviderCache) Save(ctx context.Context) error

func (*ProviderCache) Warm

func (c *ProviderCache) Warm(ctx context.Context, stackPaths []string) error

type RegistryClient

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

func NewRegistryClient

func NewRegistryClient() *RegistryClient

func (*RegistryClient) Fetch

func (*RegistryClient) GetDownloadURL

func (r *RegistryClient) GetDownloadURL(ctx context.Context, p Provider) (string, error)

type StorageBackend

type StorageBackend interface {
	Exists(ctx context.Context, key string) (bool, error)
	Get(ctx context.Context, key string) (io.ReadCloser, int64, error)
	Put(ctx context.Context, key string, r io.Reader, size int64) error
}

Jump to

Keyboard shortcuts

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