relay

package
v0.83.2 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: BSD-3-Clause Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
	// Transport is the negotiated relay transport, empty
	// for stun/turn probes or when not connected.
	Transport string
}

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

type StunTurnProbe added in v0.59.9

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

func NewStunTurnProbe added in v0.59.9

func NewStunTurnProbe(cacheTTL time.Duration) *StunTurnProbe

func (*StunTurnProbe) ProbeAll added in v0.59.9

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 added in v0.59.9

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