Documentation
¶
Index ¶
- type GSUtilCache
- func (rs *GSUtilCache) Download(ctx context.Context, dst cache.LocalCache, pkgs []cache.Package) map[string]cache.DownloadResult
- func (rs *GSUtilCache) ExistingPackages(ctx context.Context, pkgs []cache.Package) (map[cache.Package]struct{}, error)
- func (rs *GSUtilCache) HasFile(ctx context.Context, key string) (bool, error)
- func (rs *GSUtilCache) Upload(ctx context.Context, src cache.LocalCache, pkgs []cache.Package) error
- func (rs *GSUtilCache) UploadFile(ctx context.Context, filePath string, key string) error
- type NoRemoteCache
- func (NoRemoteCache) Download(ctx context.Context, dst cache.LocalCache, pkgs []cache.Package) map[string]cache.DownloadResult
- func (NoRemoteCache) ExistingPackages(ctx context.Context, pkgs []cache.Package) (map[cache.Package]struct{}, error)
- func (NoRemoteCache) HasFile(ctx context.Context, key string) (bool, error)
- func (NoRemoteCache) Upload(ctx context.Context, src cache.LocalCache, pkgs []cache.Package) error
- func (NoRemoteCache) UploadFile(ctx context.Context, filePath string, key string) error
- type S3Cache
- func (s *S3Cache) Download(ctx context.Context, dst cache.LocalCache, pkgs []cache.Package) map[string]cache.DownloadResult
- func (s *S3Cache) ExistingPackages(ctx context.Context, pkgs []cache.Package) (map[cache.Package]struct{}, error)
- func (s *S3Cache) HasFile(ctx context.Context, key string) (bool, error)
- func (s *S3Cache) Upload(ctx context.Context, src cache.LocalCache, pkgs []cache.Package) error
- func (s *S3Cache) UploadFile(ctx context.Context, filePath string, key string) error
- type S3Config
- type S3Storage
- func (s *S3Storage) GetObject(ctx context.Context, key string, dest string) (int64, error)
- func (s *S3Storage) HasObject(ctx context.Context, key string) (bool, error)
- func (s *S3Storage) ListObjects(ctx context.Context, prefix string) ([]string, error)
- func (s *S3Storage) UploadObject(ctx context.Context, key string, src string) error
- func (s *S3Storage) ValidateObject(ctx context.Context, key, localPath string) error
- type VerificationFailedError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GSUtilCache ¶
type GSUtilCache struct {
BucketName string
}
GSUtilCache uses the gsutil command to implement a remote cache
func NewGSUtilCache ¶
func NewGSUtilCache(cfg *cache.RemoteConfig) *GSUtilCache
NewGSUtilCache creates a new GSUtil cache implementation
func (*GSUtilCache) Download ¶
func (rs *GSUtilCache) Download(ctx context.Context, dst cache.LocalCache, pkgs []cache.Package) map[string]cache.DownloadResult
Download makes a best-effort attempt at downloading previously cached build artifacts. Returns detailed results for each package to enable smarter retry decisions.
func (*GSUtilCache) ExistingPackages ¶
func (rs *GSUtilCache) ExistingPackages(ctx context.Context, pkgs []cache.Package) (map[cache.Package]struct{}, error)
ExistingPackages returns existing cached build artifacts in the remote cache
func (*GSUtilCache) HasFile ¶ added in v0.13.0
HasFile checks if a file exists in the remote cache with the given key
func (*GSUtilCache) Upload ¶
func (rs *GSUtilCache) Upload(ctx context.Context, src cache.LocalCache, pkgs []cache.Package) error
Upload makes a best effort to upload the build artifacts to a remote cache
func (*GSUtilCache) UploadFile ¶ added in v0.11.0
UploadFile uploads a single file to the remote cache with the given key
type NoRemoteCache ¶
type NoRemoteCache struct{}
NoRemoteCache implements the default no-remote cache behavior
func NewNoRemoteCache ¶
func NewNoRemoteCache() *NoRemoteCache
NewNoRemoteCache creates a new NoRemoteCache instance
func (NoRemoteCache) Download ¶
func (NoRemoteCache) Download(ctx context.Context, dst cache.LocalCache, pkgs []cache.Package) map[string]cache.DownloadResult
Download makes a best-effort attempt at downloading previously cached build artifacts. NoRemoteCache always returns NotFound for all packages since there is no remote cache.
func (NoRemoteCache) ExistingPackages ¶
func (NoRemoteCache) ExistingPackages(ctx context.Context, pkgs []cache.Package) (map[cache.Package]struct{}, error)
ExistingPackages returns existing cached build artifacts in the remote cache
func (NoRemoteCache) HasFile ¶ added in v0.13.0
HasFile checks if a file exists in the remote cache with the given key
func (NoRemoteCache) Upload ¶
func (NoRemoteCache) Upload(ctx context.Context, src cache.LocalCache, pkgs []cache.Package) error
Upload makes a best effort to upload the build artifacts to a remote cache
func (NoRemoteCache) UploadFile ¶ added in v0.11.0
UploadFile uploads a single file to the remote cache with the given key
type S3Cache ¶
type S3Cache struct {
// contains filtered or unexported fields
}
S3Cache implements RemoteCache using AWS S3
func NewS3Cache ¶
func NewS3Cache(cfg *cache.RemoteConfig) (*S3Cache, error)
NewS3Cache creates a new S3 cache implementation
func (*S3Cache) Download ¶
func (s *S3Cache) Download(ctx context.Context, dst cache.LocalCache, pkgs []cache.Package) map[string]cache.DownloadResult
Download implements RemoteCache. Returns detailed results for each package, enabling callers to distinguish between transient failures (retry may help) and permanent failures (rebuild required).
func (*S3Cache) ExistingPackages ¶
func (s *S3Cache) ExistingPackages(ctx context.Context, pkgs []cache.Package) (map[cache.Package]struct{}, error)
ExistingPackages implements RemoteCache
func (*S3Cache) HasFile ¶ added in v0.13.0
HasFile checks if a file exists in the remote cache with the given key
type S3Storage ¶
type S3Storage struct {
// contains filtered or unexported fields
}
S3Storage implements ObjectStorage using AWS S3
func NewS3Storage ¶
NewS3Storage creates a new S3 storage implementation
func (*S3Storage) ListObjects ¶
ListObjects implements ObjectStorage
func (*S3Storage) UploadObject ¶
UploadObject implements ObjectStorage
type VerificationFailedError ¶ added in v0.13.1
VerificationFailedError is returned when SLSA verification fails
func (VerificationFailedError) Error ¶ added in v0.13.1
func (e VerificationFailedError) Error() string