Help us shape the future of Go! Take the 2026 Go Developer Survey

mapping

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTooManyAttempts = errors.New("too many failed attempts")
)

Functions

This section is empty.

Types

type AddrPool

type AddrPool interface {
	GetRandom() netip.Addr
}

type SQLiteMapping

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

func New

func New(dbPath string, addrPool AddrPool) (*SQLiteMapping, error)

func (*SQLiteMapping) Close

func (m *SQLiteMapping) Close() error

func (*SQLiteMapping) EnsureMapping

func (m *SQLiteMapping) EnsureMapping(clientKey, domainName string, ttl time.Duration) (netip.Addr, error)

func (*SQLiteMapping) ReverseLookup

func (m *SQLiteMapping) ReverseLookup(clientKey string, addr netip.Addr) (domainName string, ok bool, err error)

Jump to

Keyboard shortcuts

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