Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// ErrBucketNotExists indicates that requested bucket does not exist
ErrBucketNotExists = &shared.EntityNotExistsError{Message: "requested bucket does not exist"}
// ErrBlobNotExists indicates that requested blob does not exist
ErrBlobNotExists = &shared.EntityNotExistsError{Message: "requested blob does not exist"}
// ErrBlobSerialization indicates that a failure occurred in serializing blob
ErrBlobSerialization = &shared.BadRequestError{Message: "failed to serialize blob"}
// ErrBlobDeserialization indicates that a failure occurred in deserializing blob
ErrBlobDeserialization = &shared.BadRequestError{Message: "failed to deserialize blob"}
// ErrConstructKey could not construct key
ErrConstructKey = &shared.BadRequestError{Message: "could not construct key"}
)
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
Upload(ctx context.Context, bucket string, key blob.Key, blob *blob.Blob) error
Download(ctx context.Context, bucket string, key blob.Key) (*blob.Blob, error)
GetTags(ctx context.Context, bucket string, key blob.Key) (map[string]string, error)
Exists(ctx context.Context, bucket string, key blob.Key) (bool, error)
Delete(ctx context.Context, bucket string, key blob.Key) (bool, error)
ListByPrefix(ctx context.Context, bucket string, prefix string) ([]blob.Key, error)
BucketExists(ctx context.Context, bucket string) (bool, error)
IsRetryableError(err error) bool
GetRetryPolicy() backoff.RetryPolicy
}
Client is used to operate on blobs in a blobstore
func NewMetricClient ¶ added in v0.5.2
func NewMetricClient(client Client, metricsClient metrics.Client) Client
NewMetricClient creates a new instance of Client that emits metrics
func NewRetryableClient ¶ added in v0.5.2
func NewRetryableClient(client Client, policy backoff.RetryPolicy, isRetryable backoff.IsRetryable) Client
NewRetryableClient creates a new instance of Client with retry policy
Click to show internal directories.
Click to hide internal directories.