tester

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 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 ResultReporter

type ResultReporter interface {
	UsableResult(tag string, ok bool)
	SpeedResult(tag string, speed int64)
	IPv6Result(tag string, ok bool)
	PingResult(tag string, ping int)
}

type Tester

type Tester struct {
	SpeedTestFunc  func(ctx context.Context, h i.Outbound) (int64, error)
	UsableTestFunc func(ctx context.Context, h i.Outbound) (bool, error)
	PingTestFunc   func(ctx context.Context, h i.Outbound) (int, error)
	ResultReporter
	// contains filtered or unexported fields
}

func (*Tester) TestIPv6

func (t *Tester) TestIPv6(ctx context.Context, h i.Outbound) bool

func (*Tester) TestPing

func (t *Tester) TestPing(ctx context.Context, h i.Outbound) int

func (*Tester) TestSpeed

func (t *Tester) TestSpeed(ctx context.Context, h i.Outbound, rtry bool) int64

return -1 if test failed

func (*Tester) TestUsable

func (t *Tester) TestUsable(ctx context.Context, h i.Outbound, retry bool) bool

Jump to

Keyboard shortcuts

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