obj

package
v1.0.1-RCX15 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2016 License: Apache-2.0 Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackoffReadCloser

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

BackoffReadCloser retries with exponential backoff in the case of failures

func (*BackoffReadCloser) Close

func (b *BackoffReadCloser) Close() error

func (*BackoffReadCloser) Read

func (b *BackoffReadCloser) Read(data []byte) (int, error)

type BackoffWriteCloser

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

BackoffWriteCloser retries with exponential backoff in the case of failures

func (*BackoffWriteCloser) Close

func (b *BackoffWriteCloser) Close() error

func (*BackoffWriteCloser) Write

func (b *BackoffWriteCloser) Write(data []byte) (int, error)

type Client

type Client interface {
	// Writer returns a writer which writes to an object.
	// It should error if the object already exists or we don't have sufficient
	// permissions to write it.
	Writer(name string) (io.WriteCloser, error)
	// Reader returns a reader which reads from an object.
	// If `size == 0`, the reader should read from the offset till the end of the object.
	// It should error if the object doesn't exist or we don't have sufficient
	// permission to read it.
	Reader(name string, offset uint64, size uint64) (io.ReadCloser, error)
	// Delete deletes an object.
	// It should error if the object doesn't exist or we don't have sufficient
	// permission to delete it.
	Delete(name string) error
	// Walk calls `fn` with the names of objects which can be found under `prefix`.
	Walk(prefix string, fn func(name string) error) error
	// IsRetryable determines if an operation should be retried given an error
	IsRetryable(err error) bool
	// IsNotExist returns true if err is a non existence error
	IsNotExist(err error) bool
}

Client is an interface to object storage.

func NewAmazonClient

func NewAmazonClient(bucket string, id string, secret string, token string,
	region string) (Client, error)

func NewGoogleClient

func NewGoogleClient(ctx context.Context, bucket string) (Client, error)

type RetryError

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

Jump to

Keyboard shortcuts

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