Documentation ¶
Overview ¶
Package s3readerat implements io.ReaderAt using S3 GetObject and Range.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type S3ReaderAt ¶
type S3ReaderAt struct { Debug bool // contains filtered or unexported fields }
S3ReaderAt is io.ReaderAt implementation that makes HTTP Range Requests. New instances must be created with the New() function. It is safe for concurrent use.
func NewWithSize ¶
func NewWithSize(client *s3.Client, bucket string, key string, size int64) (ra *S3ReaderAt, err error)
NewWithSize creates a new S3ReaderAt that skips checking the S3 object's size.
func (*S3ReaderAt) ReadAt ¶
func (ra *S3ReaderAt) ReadAt(p []byte, off int64) (n int, err error)
ReadAt reads len(b) bytes from the remote file starting at byte offset off. It returns the number of bytes read and the error, if any. ReadAt always returns a non-nil error when n < len(b). At end of file, that error is io.EOF. It is safe for concurrent use.
func (*S3ReaderAt) Size ¶
func (ra *S3ReaderAt) Size() (int64, error)
func (*S3ReaderAt) WithContext ¶
func (ra *S3ReaderAt) WithContext(ctx context.Context) *S3ReaderAt
Click to show internal directories.
Click to hide internal directories.