vip

package
v2.21.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TranslateEnvironmentIPs added in v2.21.0

func TranslateEnvironmentIPs(ctx context.Context, env map[string]string, provider LocalIPProvider)

Types

type Generator

type Generator interface {
	Next() (netip.Addr, error)
	Subnet() netip.Prefix
}

func NewGenerator

func NewGenerator(sn netip.Prefix) Generator

NewGenerator creates a generator for virtual IPs with in the given subnet.

type LocalIPProvider added in v2.21.0

type LocalIPProvider interface {
	MapsIPv4() bool
	MapsIPv6() bool
	GetLocalIP(ctx context.Context, remoteIP netip.Addr) (netip.Addr, error)
}

Jump to

Keyboard shortcuts

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