icetester

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2025 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultICETesterImage                    = "docker.io/l7mp/icetester:latest"
	DefaultICETesterTimeout                  = 5 * time.Minute
	DefaultICETesterPacketRate time.Duration = 0
)
View Source
const (
	MaxPacketCount = 10000
)

Variables

This section is empty.

Functions

func ContainsDesc

func ContainsDesc(cs []CandidateDesc, c string) bool

func NewICETester

func NewICETester(config Config) (*iceTester, error)

Types

type CandidateDesc

type CandidateDesc struct {
	Candidate string
	Selected  bool
}

parse from the sdps

type Config

type Config struct {
	EventChannel chan Event

	K8sConfigFlags  *cliopt.ConfigFlags
	CDSConfigFlags  *cdsclient.CDSConfigFlags
	AuthConfigFlags *cdsclient.AuthConfigFlags

	Namespace      string
	TURNTransports []v1.ListenerProtocol
	ICETesterImage string
	ForceCleanup   bool
	PacketRate     int
	OffloadEngine  v1.OffloadMode
	AllowNodePort  bool

	Logger logger.LoggerFactory
}

type Event

type Event struct {
	Type        EventType
	Error       error
	Diagnostics string
	Args        map[string]any
	Timestamp   time.Time
	InProgress  bool
}

type EventType

type EventType int
const (
	EventInit EventType = iota
	EventInstallationComplete
	EventGatewayAvailable
	EventICEConfigAvailable
	EventAsymmetricICETest
	EventSymmetricICETest
)

func (EventType) String

func (t EventType) String() string

type ICETestType

type ICETestType int
const (
	ICETestAsymmetric ICETestType = iota
	ICETestSymmetric
)

func (ICETestType) String

func (t ICETestType) String() string

type Packet

type Packet struct {
	SeqNum    uint32
	Timestamp int64
}

type Stats

type Stats struct {
	SendRate        float64 // packets per second
	LossRate        float64 // percentage
	MeanLatency     float64 // milliseconds
	MedianLatency   float64 // milliseconds
	P95Latency      float64 // milliseconds
	P99Latency      float64 // milliseconds
	PacketsSent     uint32
	PacketsReceived uint32
	Duration        time.Duration
}

func FloodTest

func FloodTest(ctx context.Context, conn net.Conn, interval time.Duration, packetSize int) (*Stats, error)

Jump to

Keyboard shortcuts

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