httpio

package
v0.10.8 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 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 Cfg

type Cfg struct {
	BeginPos int64 `json:"beginPos" yaml:"beginPos"`
	EndPos   int64 `json:"endPos"   yaml:"endPos"`
	PartSize int64 `json:"partSize" yaml:"partSize"`
	Retry    int   `json:"retry"    yaml:"retry"`
}

type Reader

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

func New

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

func (*Reader) Close

func (r *Reader) Close() error

func (*Reader) Pos

func (r *Reader) Pos() int64

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