storage

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

type Bucket interface {
	objstore.Bucket
	GetReaderAt(ctx context.Context, name string) (io.ReaderAt, error)
}

Bucket is an objstore.Bucket that also supports reading files via a ReaderAt interface.

type BucketReaderAt

type BucketReaderAt struct {
	objstore.Bucket
}

BucketReaderAt implements the Bucket interface.

func NewBucketReaderAt

func NewBucketReaderAt(bucket objstore.Bucket) *BucketReaderAt

NewBucketReaderAt returns a new Bucket.

func (*BucketReaderAt) GetReaderAt

func (b *BucketReaderAt) GetReaderAt(ctx context.Context, name string) (io.ReaderAt, error)

GetReaderAt returns a io.ReaderAt for the given filename.

type FileReaderAt

type FileReaderAt struct {
	objstore.Bucket
	// contains filtered or unexported fields
}

FileReaderAt is a wrapper around a objstore.Bucket that implements the ReaderAt interface.

func (*FileReaderAt) ReadAt

func (b *FileReaderAt) ReadAt(p []byte, off int64) (n int, err error)

ReadAt implements the io.ReaderAt interface.

Jump to

Keyboard shortcuts

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