reader

package
v0.10.5 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAlreadyClosed = errors.New("already closed")
)

Functions

This section is empty.

Types

type Option

type Option func(*Reader)

func BeginPos

func BeginPos(pos int64) Option

func EndPos

func EndPos(pos int64) Option

func PartSize

func PartSize(s int64) Option

func Retry

func Retry(retry int) Option

func WithReqOptions

func WithReqOptions(opts ...httpc.Option) Option

type Reader

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

func New

func New(ctx context.Context, timeout time.Duration, url string, opts ...Option) *Reader

func (*Reader) Close

func (r *Reader) Close() error

func (*Reader) Read

func (r *Reader) Read(p []byte) (int, error)

func (*Reader) WriteTo

func (r *Reader) WriteTo(w io.Writer) (int64, error)

Jump to

Keyboard shortcuts

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