network

package
v0.0.0-...-2278081 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressVersion

type AddressVersion int
const (
	IPv4 AddressVersion = iota
	IPv6
)

type Network

type Network struct {
	Name string
	// contains filtered or unexported fields
}

func New

func New(name string, prefixV4 string, prefixV6 string) *Network

func (*Network) Address

func (n *Network) Address(addressVersion AddressVersion) netip.Addr

func (*Network) Allocate

func (n *Network) Allocate(addressVersion AddressVersion) netip.Addr

func (*Network) Enabled

func (n *Network) Enabled(addressVersion AddressVersion) bool

func (*Network) Release

func (n *Network) Release(addr netip.Addr)

Jump to

Keyboard shortcuts

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