registry

package
v1.16.1 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: MPL-2.0 Imports: 3 Imported by: 0

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

View Source
var (
	Default = New()
)

Functions

func Get

func Get(scheme string, less func(i, j interface{}) bool) interface{}

func Register

func Register(scheme string, item interface{})

func Unregister

func Unregister(scheme string, item interface{})

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, less func(i, j interface{}) bool) interface{}

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