pacer

package
v2.0.0-...-55ffeb8 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2022 License: GPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pacer

type Pacer interface {
	Start(context.Context, debug.DebugLevel) bool
	TransferredInInterval() (uint64, time.Duration)
	Client() *http.Client
	Valid() bool
	InProgress() bool
	ClientId() uint64
	Connection() utilities.Optional[net.Conn]
}

type PacerDownload

type PacerDownload struct {
	Path string

	KeyLogger io.Writer
	// contains filtered or unexported fields
}

TODO: All 64-bit fields that are accessed atomically must appear at the top of this struct.

func NewPacerDownload

func NewPacerDownload(url string) PacerDownload

func (*PacerDownload) Client

func (pd *PacerDownload) Client() *http.Client

func (*PacerDownload) ClientId

func (pd *PacerDownload) ClientId() uint64

func (*PacerDownload) Connection

func (pd *PacerDownload) Connection() utilities.Optional[net.Conn]

func (*PacerDownload) InProgress

func (pd *PacerDownload) InProgress() bool

func (*PacerDownload) SetConnectDoneTimeError

func (pd *PacerDownload) SetConnectDoneTimeError(
	now time.Time,
	err error,
)

func (*PacerDownload) SetConnectStartTime

func (pd *PacerDownload) SetConnectStartTime(
	now time.Time,
)

func (*PacerDownload) SetDnsDoneTimeInfo

func (pd *PacerDownload) SetDnsDoneTimeInfo(
	now time.Time,
	dnsDoneInfo httptrace.DNSDoneInfo,
)

func (*PacerDownload) SetDnsStartTimeInfo

func (pd *PacerDownload) SetDnsStartTimeInfo(
	now time.Time,
	dnsStartInfo httptrace.DNSStartInfo,
)

func (*PacerDownload) SetGetConnTime

func (pd *PacerDownload) SetGetConnTime(now time.Time)

func (*PacerDownload) SetGotConnTimeInfo

func (pd *PacerDownload) SetGotConnTimeInfo(
	now time.Time,
	gotConnInfo httptrace.GotConnInfo,
)

func (*PacerDownload) SetHttpResponseReadyTime

func (pd *PacerDownload) SetHttpResponseReadyTime(
	now time.Time,
)

func (*PacerDownload) SetHttpWroteRequestTimeInfo

func (pd *PacerDownload) SetHttpWroteRequestTimeInfo(
	now time.Time,
	info httptrace.WroteRequestInfo,
)

func (*PacerDownload) SetTLSHandshakeDoneTimeState

func (pd *PacerDownload) SetTLSHandshakeDoneTimeState(
	now time.Time,
	connectionState tls.ConnectionState,
)

func (*PacerDownload) SetTLSHandshakeStartTime

func (pd *PacerDownload) SetTLSHandshakeStartTime(
	now time.Time,
)

func (*PacerDownload) Start

func (pd *PacerDownload) Start(
	parentCtx context.Context,
	debugLevel debug.DebugLevel,
) bool

func (*PacerDownload) TransferredInInterval

func (pu *PacerDownload) TransferredInInterval() (uint64, time.Duration)

func (*PacerDownload) Valid

func (pd *PacerDownload) Valid() bool

type PacerUpload

type PacerUpload struct {
	Path string

	KeyLogger io.Writer
	// contains filtered or unexported fields
}

TODO: All 64-bit fields that are accessed atomically must appear at the top of this struct.

func NewPacerUpload

func NewPacerUpload(url string) PacerUpload

func (*PacerUpload) Client

func (pu *PacerUpload) Client() *http.Client

func (*PacerUpload) ClientId

func (pu *PacerUpload) ClientId() uint64

func (*PacerUpload) Connection

func (pu *PacerUpload) Connection() utilities.Optional[net.Conn]

func (*PacerUpload) InProgress

func (pu *PacerUpload) InProgress() bool

func (*PacerUpload) SetConnectDoneTimeError

func (pu *PacerUpload) SetConnectDoneTimeError(
	now time.Time,
	err error,
)

func (*PacerUpload) SetConnectStartTime

func (pu *PacerUpload) SetConnectStartTime(
	now time.Time,
)

func (*PacerUpload) SetDnsDoneTimeInfo

func (pu *PacerUpload) SetDnsDoneTimeInfo(
	now time.Time,
	dnsDoneInfo httptrace.DNSDoneInfo,
)

func (*PacerUpload) SetDnsStartTimeInfo

func (pu *PacerUpload) SetDnsStartTimeInfo(
	now time.Time,
	dnsStartInfo httptrace.DNSStartInfo,
)

func (*PacerUpload) SetGetConnTime

func (pu *PacerUpload) SetGetConnTime(now time.Time)

func (*PacerUpload) SetGotConnTimeInfo

func (pu *PacerUpload) SetGotConnTimeInfo(
	now time.Time,
	gotConnInfo httptrace.GotConnInfo,
)

func (*PacerUpload) SetHttpResponseReadyTime

func (pu *PacerUpload) SetHttpResponseReadyTime(
	now time.Time,
)

func (*PacerUpload) SetHttpWroteRequestTimeInfo

func (pu *PacerUpload) SetHttpWroteRequestTimeInfo(
	now time.Time,
	info httptrace.WroteRequestInfo,
)

func (*PacerUpload) SetTLSHandshakeDoneTimeState

func (pu *PacerUpload) SetTLSHandshakeDoneTimeState(
	now time.Time,
	connectionState tls.ConnectionState,
)

func (*PacerUpload) SetTLSHandshakeStartTime

func (pu *PacerUpload) SetTLSHandshakeStartTime(
	now time.Time,
)

func (*PacerUpload) Start

func (pu *PacerUpload) Start(
	parentCtx context.Context,
	debugLevel debug.DebugLevel,
) bool

func (*PacerUpload) TransferredInInterval

func (pu *PacerUpload) TransferredInInterval() (uint64, time.Duration)

func (*PacerUpload) Valid

func (pu *PacerUpload) Valid() bool

Jump to

Keyboard shortcuts

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