Documentation ¶
Index ¶
- type DeleteOption
- type DeleteOptions
- type DownloadOption
- type DownloadOptions
- type GetOption
- type GetOptions
- type ListOption
- type ListOptions
- type Option
- type Options
- type Store
- type StoreWithFallback
- func (_d StoreWithFallback) Close() (err error)
- func (_d StoreWithFallback) Delete(key string, opts ...DeleteOption) (err error)
- func (_d StoreWithFallback) Download(target string, key string, opts ...DownloadOption) (err error)
- func (_d StoreWithFallback) DownloadTo(writer io.WriterAt, key string, opts ...DownloadOption) (err error)
- func (_d StoreWithFallback) Get(key string, opts ...GetOption) (ba1 []byte, err error)
- func (_d StoreWithFallback) GetReader(key0 string, opts ...GetOption) (r1 io.ReadCloser, err error)
- func (_d StoreWithFallback) List(opts ...ListOption) (sa1 []string, err error)
- func (_d StoreWithFallback) Name() (s1 string)
- func (_d StoreWithFallback) Options() (o1 Options)
- func (_d StoreWithFallback) Upload(path string, key string, opts ...UploadOption) (s1 string, err error)
- func (_d StoreWithFallback) UploadFrom(reader io.Reader, key string, opts ...UploadOption) (s1 string, err error)
- type StoreWithRetry
- func (_d StoreWithRetry) Close() (err error)
- func (_d StoreWithRetry) Delete(key string, opts ...DeleteOption) (err error)
- func (_d StoreWithRetry) Download(target string, key string, opts ...DownloadOption) (err error)
- func (_d StoreWithRetry) DownloadTo(writer io.WriterAt, key string, opts ...DownloadOption) (err error)
- func (_d StoreWithRetry) Get(key string, opts ...GetOption) (ba1 []byte, err error)
- func (_d StoreWithRetry) GetReader(key0 string, opts ...GetOption) (r1 io.ReadCloser, err error)
- func (_d StoreWithRetry) List(opts ...ListOption) (sa1 []string, err error)
- func (_d StoreWithRetry) Upload(path string, key string, opts ...UploadOption) (s1 string, err error)
- func (_d StoreWithRetry) UploadFrom(reader io.Reader, key string, opts ...UploadOption) (s1 string, err error)
- type StoreWithTracing
- type UploadOption
- type UploadOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeleteOption ¶
type DeleteOption func(*ListOptions)
type DeleteOptions ¶
type DownloadOption ¶
type DownloadOption func(*DownloadOptions)
type DownloadOptions ¶
type GetOption ¶
type GetOption func(*GetOptions)
type GetOptions ¶
type ListOptions ¶
type Store ¶
type Store interface { Options() Options Upload(path string, key string, opts ...UploadOption) (string, error) UploadFrom(reader io.Reader, key string, opts ...UploadOption) (string, error) Download(target string, key string, opts ...DownloadOption) error DownloadTo(writer io.WriterAt, key string, opts ...DownloadOption) error Get(key string, opts ...GetOption) ([]byte, error) GetReader(key0 string, opts ...GetOption) (io.ReadCloser, error) List(opts ...ListOption) ([]string, error) Delete(key string, opts ...DeleteOption) error Name() string Close() error }
type StoreWithFallback ¶
type StoreWithFallback struct {
// contains filtered or unexported fields
}
StoreWithFallback implements Store interface wrapped with Prometheus metrics
func NewStoreWithFallback ¶
func NewStoreWithFallback(interval time.Duration, impls ...Store) StoreWithFallback
NewStoreWithFallback takes several implementations of the Store and returns an instance of Store which calls all implementations concurrently with given interval and returns first non-error response.
func (StoreWithFallback) Close ¶
func (_d StoreWithFallback) Close() (err error)
Close implements Store
func (StoreWithFallback) Delete ¶
func (_d StoreWithFallback) Delete(key string, opts ...DeleteOption) (err error)
Delete implements Store
func (StoreWithFallback) Download ¶
func (_d StoreWithFallback) Download(target string, key string, opts ...DownloadOption) (err error)
Download implements Store
func (StoreWithFallback) DownloadTo ¶
func (_d StoreWithFallback) DownloadTo(writer io.WriterAt, key string, opts ...DownloadOption) (err error)
DownloadTo implements Store
func (StoreWithFallback) Get ¶
func (_d StoreWithFallback) Get(key string, opts ...GetOption) (ba1 []byte, err error)
Get implements Store
func (StoreWithFallback) GetReader ¶
func (_d StoreWithFallback) GetReader(key0 string, opts ...GetOption) (r1 io.ReadCloser, err error)
GetReader implements Store
func (StoreWithFallback) List ¶
func (_d StoreWithFallback) List(opts ...ListOption) (sa1 []string, err error)
List implements Store
func (StoreWithFallback) Name ¶
func (_d StoreWithFallback) Name() (s1 string)
Name implements Store
func (StoreWithFallback) Options ¶
func (_d StoreWithFallback) Options() (o1 Options)
Options implements Store
func (StoreWithFallback) Upload ¶
func (_d StoreWithFallback) Upload(path string, key string, opts ...UploadOption) (s1 string, err error)
Upload implements Store
func (StoreWithFallback) UploadFrom ¶
func (_d StoreWithFallback) UploadFrom(reader io.Reader, key string, opts ...UploadOption) (s1 string, err error)
UploadFrom implements Store
type StoreWithRetry ¶
type StoreWithRetry struct { Store // contains filtered or unexported fields }
StoreWithRetry implements Store interface instrumented with retries
func NewStoreWithRetry ¶
func NewStoreWithRetry(base Store, retryCount int, retryInterval time.Duration) StoreWithRetry
NewStoreWithRetry returns StoreWithRetry
func (StoreWithRetry) Delete ¶
func (_d StoreWithRetry) Delete(key string, opts ...DeleteOption) (err error)
Delete implements Store
func (StoreWithRetry) Download ¶
func (_d StoreWithRetry) Download(target string, key string, opts ...DownloadOption) (err error)
Download implements Store
func (StoreWithRetry) DownloadTo ¶
func (_d StoreWithRetry) DownloadTo(writer io.WriterAt, key string, opts ...DownloadOption) (err error)
DownloadTo implements Store
func (StoreWithRetry) Get ¶
func (_d StoreWithRetry) Get(key string, opts ...GetOption) (ba1 []byte, err error)
Get implements Store
func (StoreWithRetry) GetReader ¶
func (_d StoreWithRetry) GetReader(key0 string, opts ...GetOption) (r1 io.ReadCloser, err error)
GetReader implements Store
func (StoreWithRetry) List ¶
func (_d StoreWithRetry) List(opts ...ListOption) (sa1 []string, err error)
List implements Store
func (StoreWithRetry) Upload ¶
func (_d StoreWithRetry) Upload(path string, key string, opts ...UploadOption) (s1 string, err error)
Upload implements Store
func (StoreWithRetry) UploadFrom ¶
func (_d StoreWithRetry) UploadFrom(reader io.Reader, key string, opts ...UploadOption) (s1 string, err error)
UploadFrom implements Store
type StoreWithTracing ¶
type StoreWithTracing struct { Store // contains filtered or unexported fields }
StoreWithTracing implements Store interface instrumented with opentracing spans
func NewStoreWithTracing ¶
func NewStoreWithTracing(base Store, instance string) StoreWithTracing
NewStoreWithTracing returns StoreWithTracing
type UploadOption ¶
type UploadOption func(*UploadOptions)
func UploadMetadata ¶
func UploadMetadata(mp map[string]interface{}) UploadOption
func UploadProgress ¶
func UploadProgress(p *pb.ProgressBar) UploadOption
func UploadProgressFinishMessage ¶
func UploadProgressFinishMessage(s string) UploadOption
func UploadProgressOutput ¶
func UploadProgressOutput(out io.Writer) UploadOption
Directories ¶
Path | Synopsis |
---|---|
localstore
Package localstore provide a storage backend based on the local file system.
|
Package localstore provide a storage backend based on the local file system. |
s3store
Package s3store provides a storage backend using AWS S3 or compatible servers.
|
Package s3store provides a storage backend using AWS S3 or compatible servers. |