probe

package
v0.0.0-...-3439542 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: GPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProbeConfiguration

type ProbeConfiguration struct {
	ConnectToAddr      string
	URL                string
	Host               string
	CongestionControl  *string
	InsecureSkipVerify bool
}

type ProbeDataPoint

type ProbeDataPoint struct {
	Time              time.Time     `` /* 138-byte string literal not displayed */
	RoundTripCount    uint64        `Description:"The number of round trips measured by this data point."`
	Duration          time.Duration `Description:"The duration for this measurement."                           Formatter:"Seconds"`
	TCPRtt            time.Duration `Description:"The underlying connection's RTT at probe time."               Formatter:"Seconds"`
	TCPCwnd           uint32        `Description:"The underlying connection's congestion window at probe time."`
	Type              ProbeType     `Description:"The type of the probe."                                       Formatter:"Value"`
	CongestionControl string        `Description:"The congestion control algorithm used."`
}

func Probe

func Probe(
	managingCtx context.Context,
	client *http.Client,
	probeUrl string,
	probeHost string,
	probeType ProbeType,
	probeId uint,
	congestionControl *string,
	captureExtendedStats bool,
	debugging *debug.DebugWithPrefix,
) (*ProbeDataPoint, error)

type ProbeRoundTripCountType

type ProbeRoundTripCountType uint16
const (
	DefaultDownRoundTripCount ProbeRoundTripCountType = 1
	SelfUpRoundTripCount      ProbeRoundTripCountType = 1
	SelfDownRoundTripCount    ProbeRoundTripCountType = 1
	ForeignRoundTripCount     ProbeRoundTripCountType = 3
)

type ProbeTracer

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

func NewProbeTracer

func NewProbeTracer(
	client *http.Client,
	probeType ProbeType,
	probeId uint,
	congestionControl *string,
	debugging *debug.DebugWithPrefix,
) *ProbeTracer

func (*ProbeTracer) GetDnsDelta

func (p *ProbeTracer) GetDnsDelta() time.Duration

func (*ProbeTracer) GetHttpDownloadDelta

func (p *ProbeTracer) GetHttpDownloadDelta(httpDoneTime time.Time) time.Duration

func (*ProbeTracer) GetHttpHeaderDelta

func (p *ProbeTracer) GetHttpHeaderDelta() time.Duration

func (*ProbeTracer) GetTCPDelta

func (p *ProbeTracer) GetTCPDelta() time.Duration

func (*ProbeTracer) GetTLSAndHttpHeaderDelta

func (p *ProbeTracer) GetTLSAndHttpHeaderDelta() time.Duration

func (*ProbeTracer) GetTLSDelta

func (p *ProbeTracer) GetTLSDelta() time.Duration

func (*ProbeTracer) GetTrace

func (p *ProbeTracer) GetTrace() *httptrace.ClientTrace

func (*ProbeTracer) ProbeId

func (p *ProbeTracer) ProbeId() uint

func (*ProbeTracer) SetConnectDoneTimeError

func (probe *ProbeTracer) SetConnectDoneTimeError(
	now time.Time,
	err error,
)

func (*ProbeTracer) SetConnectStartTime

func (probe *ProbeTracer) SetConnectStartTime(
	now time.Time,
)

func (*ProbeTracer) SetDnsDoneTimeInfo

func (probe *ProbeTracer) SetDnsDoneTimeInfo(
	now time.Time,
	dnsDoneInfo httptrace.DNSDoneInfo,
)

func (*ProbeTracer) SetDnsStartTimeInfo

func (probe *ProbeTracer) SetDnsStartTimeInfo(
	now time.Time,
	dnsStartInfo httptrace.DNSStartInfo,
)

func (*ProbeTracer) SetGetConnTime

func (probe *ProbeTracer) SetGetConnTime(now time.Time)

func (*ProbeTracer) SetGotConnTimeInfo

func (probe *ProbeTracer) SetGotConnTimeInfo(
	now time.Time,
	gotConnInfo httptrace.GotConnInfo,
)

func (*ProbeTracer) SetHttpResponseReadyTime

func (probe *ProbeTracer) SetHttpResponseReadyTime(
	now time.Time,
)

func (*ProbeTracer) SetHttpWroteRequestTimeInfo

func (probe *ProbeTracer) SetHttpWroteRequestTimeInfo(
	now time.Time,
	info httptrace.WroteRequestInfo,
)

func (*ProbeTracer) SetTLSHandshakeDoneTimeState

func (probe *ProbeTracer) SetTLSHandshakeDoneTimeState(
	now time.Time,
	connectionState tls.ConnectionState,
)

func (*ProbeTracer) SetTLSHandshakeStartTime

func (probe *ProbeTracer) SetTLSHandshakeStartTime(
	now time.Time,
)

func (*ProbeTracer) String

func (p *ProbeTracer) String() string

type ProbeType

type ProbeType int64
const (
	SelfUp ProbeType = iota
	SelfDown
	Foreign
)

func (ProbeType) IsSelf

func (pt ProbeType) IsSelf() bool

func (ProbeType) Value

func (pt ProbeType) Value() string

Jump to

Keyboard shortcuts

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