registry

package
v1.27.6 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MPL-2.0 Imports: 3 Imported by: 1

Documentation

Overview

Registry tracks connections/addresses on which we are listening on, to allow us to pick a connection/address that has a NAT port mapping. This also makes our outgoing port stable and same as incoming port which should allow better probability of punching through.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry

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

func New

func New() *Registry

func (*Registry) Get

func (r *Registry) Get(scheme string, preferred func(interface{}) bool) interface{}

Get returns an item for a schema compatible with the given scheme. If any item satisfies preferred, that has precedence over other items.

func (*Registry) Register

func (r *Registry) Register(scheme string, item interface{})

func (*Registry) Unregister

func (r *Registry) Unregister(scheme string, item interface{})

Jump to

Keyboard shortcuts

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