s3

package
v0.0.0-...-da7d6d0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2018 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct{}

Logger is an aws logger that prints entries to Logrus

func (*Logger) Log

func (l *Logger) Log(args ...interface{})

Log writes to logrus.Info

type Repositories

type Repositories map[string]Repository

Repositories is a struct that serializes to a "repositories" file

type Repository

type Repository map[string]string

Repository is an entity of Repositories struct

type Retryer

type Retryer struct {
	client.DefaultRetryer
	// contains filtered or unexported fields
}

Retryer is a custom aws retrier that logs retry attempts

func NewRetryer

func NewRetryer(retryDelay, retryMax int) *Retryer

NewRetryer returns the instance of Retryer object

func (Retryer) MaxRetries

func (d Retryer) MaxRetries() int

MaxRetries returns the number of maximum returns the service will use to make an individual API request.

func (Retryer) Outer

func (d Retryer) Outer(f func() error) error

Outer is for external stuff to handle retries for cases that are not covered by s3manager https://github.com/aws/aws-sdk-go/issues/466

func (Retryer) RetryRules

func (d Retryer) RetryRules(r *request.Request) time.Duration

RetryRules returns the delay duration before retrying this request again

type StorageS3

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

StorageS3 is a storage driver that implements storing docker images directly on S3

func New

func New(client *docker.Client, cacheRoot string) *StorageS3

New makes an instance of StorageS3 storage driver

func (*StorageS3) CacheGet

func (s *StorageS3) CacheGet(imageID string) (digest string, err error)

CacheGet returns cached digest of the image

func (*StorageS3) CachePut

func (s *StorageS3) CachePut(imageID, digest string) error

CachePut stores digest cache of the image

func (*StorageS3) ListTags

func (s *StorageS3) ListTags(imageName string) (images []*imagename.ImageName, err error)

ListTags returns the list of parsed tags existing for given image name on S3

func (*StorageS3) MakeTar

func (s *StorageS3) MakeTar(imageName string) (tmpfile string, digest string, err error)

MakeTar makes a tar out of docker image and gives a temporary file and a digest

func (*StorageS3) Pull

func (s *StorageS3) Pull(name string) error

Pull imports docker image from tar artifact stored on S3

func (*StorageS3) Push

func (s *StorageS3) Push(imageName string) (digest string, err error)

Push pushes image tarball directly to S3

Jump to

Keyboard shortcuts

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