proxy

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferedReadSeeker

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

func NewBufferedHttpReadSeeker

func NewBufferedHttpReadSeeker(bufSize int, url string, conf ...HttpReadSeekerConf) *BufferedReadSeeker

func NewBufferedReadSeeker

func NewBufferedReadSeeker(r io.ReadSeeker, bufSize int) *BufferedReadSeeker

func (*BufferedReadSeeker) Read

func (b *BufferedReadSeeker) Read(p []byte) (n int, err error)

func (*BufferedReadSeeker) ReadAt

func (b *BufferedReadSeeker) ReadAt(p []byte, off int64) (int, error)

func (*BufferedReadSeeker) Reset

func (b *BufferedReadSeeker) Reset(r io.ReadSeeker)

func (*BufferedReadSeeker) Seek

func (b *BufferedReadSeeker) Seek(offset int64, whence int) (int64, error)

type HttpReadSeeker

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

func NewHttpReadSeeker

func NewHttpReadSeeker(url string, conf ...HttpReadSeekerConf) *HttpReadSeeker

func (*HttpReadSeeker) Read

func (h *HttpReadSeeker) Read(p []byte) (n int, err error)

func (*HttpReadSeeker) Seek

func (h *HttpReadSeeker) Seek(offset int64, whence int) (int64, error)

type HttpReadSeekerConf

type HttpReadSeekerConf func(h *HttpReadSeeker)

func WithAppendHeaders

func WithAppendHeaders(headers map[string]string) HttpReadSeekerConf

func WithBody

func WithBody(body []byte) HttpReadSeekerConf

func WithClient

func WithClient(client *http.Client) HttpReadSeekerConf

func WithContentLength

func WithContentLength(contentLength int64) HttpReadSeekerConf

func WithContext

func WithContext(ctx context.Context) HttpReadSeekerConf

func WithHeaders

func WithHeaders(headers map[string]string) HttpReadSeekerConf

func WithMethod

func WithMethod(method string) HttpReadSeekerConf

func WithStartOffset

func WithStartOffset(offset int64) HttpReadSeekerConf

Jump to

Keyboard shortcuts

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