relay

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2025 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCacheTTL = 20 * time.Second
)

Variables

View Source
var (
	ErrCheckInProgress = errors.New("probe check is already in progress")
)

Functions

This section is empty.

Types

type ProbeResult

type ProbeResult struct {
	URI  string
	Err  error
	Addr string
}

ProbeResult holds the info about the result of a relay probe request

type StunTurnProbe

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

func NewStunTurnProbe

func NewStunTurnProbe(cacheTTL time.Duration) *StunTurnProbe

func (*StunTurnProbe) ProbeAll

func (p *StunTurnProbe) ProbeAll(ctx context.Context, stuns []*stun.URI, turns []*stun.URI) []ProbeResult

ProbeAll probes all given servers asynchronously and returns the results

func (*StunTurnProbe) ProbeAllWaitResult

func (p *StunTurnProbe) ProbeAllWaitResult(ctx context.Context, stuns []*stun.URI, turns []*stun.URI) []ProbeResult

Jump to

Keyboard shortcuts

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