Documentation ¶
Index ¶
- Constants
- Variables
- func ComposeAll(target string, parts []string, composeFunc ComposeFunc) error
- func ReadAllWithTimeout(r io.Reader, buf []byte, timeout time.Duration) (n int, err error)
- func WithTranslator(t block.UploadIDTranslator) func(a *Adapter)
- type Adapter
- func (a *Adapter) AbortMultiPartUpload(ctx context.Context, obj block.ObjectPointer, uploadID string) error
- func (a *Adapter) BlockstoreType() string
- func (a *Adapter) Close() error
- func (a *Adapter) CompleteMultiPartUpload(ctx context.Context, obj block.ObjectPointer, uploadID string, ...) (*string, int64, error)
- func (a *Adapter) Copy(ctx context.Context, sourceObj, destinationObj block.ObjectPointer) error
- func (a *Adapter) CreateMultiPartUpload(ctx context.Context, obj block.ObjectPointer, r *http.Request, ...) (string, error)
- func (a *Adapter) Exists(ctx context.Context, obj block.ObjectPointer) (bool, error)
- func (a *Adapter) GenerateInventory(_ context.Context, _ logging.Logger, _ string, _ bool, _ []string) (block.Inventory, error)
- func (a *Adapter) Get(ctx context.Context, obj block.ObjectPointer, _ int64) (io.ReadCloser, error)
- func (a *Adapter) GetProperties(ctx context.Context, obj block.ObjectPointer) (block.Properties, error)
- func (a *Adapter) GetRange(ctx context.Context, obj block.ObjectPointer, startPosition int64, ...) (io.ReadCloser, error)
- func (a *Adapter) GetStorageNamespaceInfo() block.StorageNamespaceInfo
- func (a *Adapter) Put(ctx context.Context, obj block.ObjectPointer, sizeBytes int64, ...) error
- func (a *Adapter) Remove(ctx context.Context, obj block.ObjectPointer) error
- func (a *Adapter) RuntimeStats() map[string]string
- func (a *Adapter) UploadCopyPart(ctx context.Context, sourceObj, destinationObj block.ObjectPointer, ...) (string, error)
- func (a *Adapter) UploadCopyPartRange(ctx context.Context, sourceObj, destinationObj block.ObjectPointer, ...) (string, error)
- func (a *Adapter) UploadPart(ctx context.Context, obj block.ObjectPointer, sizeBytes int64, ...) (string, error)
- func (a *Adapter) ValidateConfiguration(ctx context.Context, _ string) error
- func (a *Adapter) Walk(ctx context.Context, walkOpt block.WalkOpts, walkFn block.WalkFunc) error
- type ComposeFunc
- type StreamingReader
Constants ¶
View Source
const ( BlockstoreType = "gs" MaxMultipartObjects = 10000 )
View Source
const ( StreamingSha256 = "STREAMING-AWS4-HMAC-SHA256-PAYLOAD" StreamingContentEncoding = "aws-chunked" )
View Source
const MaxPartsInCompose = 32
Variables ¶
View Source
var ( ErrNotImplemented = errors.New("not implemented") ErrMissingPartNumber = errors.New("missing part number") ErrMissingPartETag = errors.New("missing part ETag") ErrMismatchPartETag = errors.New("mismatch part ETag") ErrMismatchPartName = errors.New("mismatch part name") ErrMaxMultipartObjects = errors.New("maximum multipart object reached") ErrPartListMismatch = errors.New("multipart part list mismatch") ErrMissingTargetAttrs = errors.New("missing target attributes") )
View Source
var ErrReaderTimeout = errors.New("reader timeout")
Functions ¶
func ComposeAll ¶
func ComposeAll(target string, parts []string, composeFunc ComposeFunc) error
func ReadAllWithTimeout ¶
ReadAllWithTimeout is taken from io.ReadAtLeast and adapted to support a timeout
func WithTranslator ¶
func WithTranslator(t block.UploadIDTranslator) func(a *Adapter)
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
func (*Adapter) AbortMultiPartUpload ¶
func (*Adapter) BlockstoreType ¶
func (*Adapter) CompleteMultiPartUpload ¶
func (*Adapter) CreateMultiPartUpload ¶
func (*Adapter) GenerateInventory ¶
func (*Adapter) Get ¶
func (a *Adapter) Get(ctx context.Context, obj block.ObjectPointer, _ int64) (io.ReadCloser, error)
func (*Adapter) GetProperties ¶
func (a *Adapter) GetProperties(ctx context.Context, obj block.ObjectPointer) (block.Properties, error)
func (*Adapter) GetRange ¶
func (a *Adapter) GetRange(ctx context.Context, obj block.ObjectPointer, startPosition int64, endPosition int64) (io.ReadCloser, error)
func (*Adapter) GetStorageNamespaceInfo ¶
func (a *Adapter) GetStorageNamespaceInfo() block.StorageNamespaceInfo
func (*Adapter) RuntimeStats ¶ added in v0.41.1
func (*Adapter) UploadCopyPart ¶
func (*Adapter) UploadCopyPartRange ¶
func (*Adapter) UploadPart ¶
func (*Adapter) ValidateConfiguration ¶
type ComposeFunc ¶
type StreamingReader ¶
type StreamingReader struct { Reader io.Reader Size int StreamSigner *v4.StreamSigner Time time.Time ChunkSize int ChunkTimeout time.Duration // contains filtered or unexported fields }
func (*StreamingReader) GetLastChunk ¶
func (s *StreamingReader) GetLastChunk() []byte
Click to show internal directories.
Click to hide internal directories.