Documentation
¶
Index ¶
Constants ¶
const ( WebSocketPath = "/v2/ws" )
Variables ¶
var ErrInvalid = errors.New("invalid network endpoint")
var ErrWhitespace = fmt.Errorf("%w: relay whitespace", ErrInvalid)
ErrWhitespace identifies rejected spacing at the validation source, so callers do not mistake otherwise valid path contents for the failure cause.
Functions ¶
func BaseFromWebSocketURL ¶
BaseFromWebSocketURL converts a full endpoint back to a candidate base. The escaped mount and routing query participate in dialing and must round-trip.
func NormalizeSTUN ¶
NormalizeSTUN accepts the UDP endpoint contract shared by native and browser ICE. It only validates deployment data; it never resolves or probes the address.
Types ¶
type NumericHostError ¶
type NumericHostError struct {
Host string
}
NumericHostError preserves the host that WHATWG attempts to parse as IPv4 rather than DNS. Callers can explain the rejection without parsing an error message or exposing the URL's credentials.
func (*NumericHostError) Error ¶
func (err *NumericHostError) Error() string
func (*NumericHostError) Unwrap ¶
func (err *NumericHostError) Unwrap() error
type Relay ¶
func NormalizeRelay ¶
NormalizeRelay is the single production implementation of the endpoint bytes signed by registration and stop. Query credentials remain on DialURL but are deliberately excluded from the long-lived relay identity.
type RelayBaseHint ¶
type RelayBaseHint struct {
// contains filtered or unexported fields
}
RelayBaseHint is a display address. Routing queries never enter diagnostics.
func WebSocketBaseHint ¶
func WebSocketBaseHint(address string) (RelayBaseHint, bool)
WebSocketBaseHint can explain a failed route or a discovery mismatch. A suffix alone says nothing about whether the original candidate is a working mount.
func (RelayBaseHint) URL ¶
func (hint RelayBaseHint) URL() string