Documentation
¶
Index ¶
- type GSUtilCache
- func (rs *GSUtilCache) Download(ctx context.Context, dst cache.LocalCache, pkgs []cache.Package) error
- func (rs *GSUtilCache) ExistingPackages(ctx context.Context, pkgs []cache.Package) (map[cache.Package]struct{}, error)
- func (rs *GSUtilCache) Upload(ctx context.Context, src cache.LocalCache, pkgs []cache.Package) error
- type NoRemoteCache
- func (NoRemoteCache) Download(ctx context.Context, dst cache.LocalCache, pkgs []cache.Package) error
- func (NoRemoteCache) ExistingPackages(ctx context.Context, pkgs []cache.Package) (map[cache.Package]struct{}, error)
- func (NoRemoteCache) Upload(ctx context.Context, src cache.LocalCache, pkgs []cache.Package) error
- type S3Cache
- func (s *S3Cache) Download(ctx context.Context, dst cache.LocalCache, pkgs []cache.Package) error
- func (s *S3Cache) ExistingPackages(ctx context.Context, pkgs []cache.Package) (map[cache.Package]struct{}, error)
- func (s *S3Cache) Upload(ctx context.Context, src cache.LocalCache, pkgs []cache.Package) 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
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) error
Download makes a best-effort attempt at downloading previously cached build artifacts
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) 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
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) error
Download makes a best-effort attempt at downloading previously cached build artifacts
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) 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
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
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