store

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2014 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileStore

type FileStore struct {
	Prefix string
	// contains filtered or unexported fields
}

FileStore stores stuff as files. Wow!

func NewFileStore

func NewFileStore(prefix string, log *logrus.Logger, md metadata.LookupSaver) *FileStore

NewFileStore returns a *FileStore. AMAZE.

func (*FileStore) Fetch

func (fs *FileStore) Fetch(path, jobID string) (*artifact.Artifact, error)

Fetch returns an artifact given a path and job id

func (*FileStore) Store

func (fs *FileStore) Store(a *artifact.Artifact) error

Store does the storing

type S3Store

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

S3Store is a Storer for S3!!!

func NewS3Store

func NewS3Store(key, secret, bucket, regionName string,
	log *logrus.Logger, md metadata.LookupSaver) (*S3Store, error)

NewS3Store initializes an *S3Store. Wow!

func (*S3Store) Fetch

func (s3s *S3Store) Fetch(path, jobID string) (*artifact.Artifact, error)

Fetch returns an artifact given a path and job id

func (*S3Store) Store

func (s3s *S3Store) Store(a *artifact.Artifact) error

Store stores the stuff in the S3

func (*S3Store) String

func (s3s *S3Store) String() string

type Storer

type Storer interface {
	Store(*artifact.Artifact) error
	Fetch(string, string) (*artifact.Artifact, error)
}

Storer defines how stuff gets stored

Jump to

Keyboard shortcuts

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