iptable

package module
v0.0.0-...-52909c8 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

README

ip table

used to keep track of ips with a to and from address. Used to claim IP(s) from a range or prefix.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPAddress

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

func (IPAddress) Equal

func (r IPAddress) Equal(a2 IPAddress) bool

func (IPAddress) Get

func (r IPAddress) Get(label string) string

satisfy the k8s labels.Label interface

func (IPAddress) Has

func (r IPAddress) Has(label string) bool

satisfy the k8s labels.Label interface

func (IPAddress) Labels

func (r IPAddress) Labels() labels.Set

func (IPAddress) String

func (r IPAddress) String() string

type IPTable

type IPTable[T1 any] interface {
	GetIP(addr string) (T1, error)
	ClaimIP(addr string, data T1) error
	UpdateIP(addr string, data T1) error
	ReleaseIP(addr string) error
	GetIndex(index int) (T1, error)
	ClaimIndex(index int, data T1) (string, error)
	UpdateIndex(index int, data T1) error
	ReleaseIndex(index int) error
	ClaimRandomIP(data T1) (string, error)
}

func NewIPTable

func NewIPTable[T1 any](from, to netip.Addr) IPTable[T1]

Jump to

Keyboard shortcuts

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