s3

package
v2.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheManager

type CacheManager struct {
	AccessKeyID, SecretAccessKey string // AWS credentials scoped to S3 only
	Region, Bucket, Keypfx       string
	DL                           datalayer.DataLayer
	S3UploaderFactoryFunc        func(s *session.Session) s3manageriface.UploaderAPI
	S3DownloaderFactoryFunc      func(s *session.Session) s3manageriface.DownloaderAPI
}

func (*CacheManager) Fetch

func (cm *CacheManager) Fetch(ctx context.Context, b models.Build) (string, error)

Fetch fetches the cache for a build from S3 and returns the temporary filesystem path where it can be found. Caller is responsible for cleaning the path up when finished with the data.

func (*CacheManager) Save

func (cm *CacheManager) Save(ctx context.Context, b models.Build, path string) error

Save persists the cache for a build located at path in S3. Caller is responsible for cleaning up the path after Save returns.

Jump to

Keyboard shortcuts

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