table

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: Apache-2.0 Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RIB

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

func NewRIB

func NewRIB() *RIB

func (*RIB) Add

func (rib *RIB) Add(r Route) error

func (*RIB) Children

func (rib *RIB) Children(cidr netip.Prefix) (r Routes)

func (*RIB) Clone

func (rib *RIB) Clone() *RIB

func (*RIB) Delete

func (rib *RIB) Delete(r Route) error

func (*RIB) Get

func (rib *RIB) Get(cidr netip.Prefix) (Route, bool)

func (*RIB) GetAvailablePrefixByBitLen

func (rib *RIB) GetAvailablePrefixByBitLen(cidr netip.Prefix, b uint8) netip.Prefix

func (*RIB) GetAvailablePrefixes

func (rib *RIB) GetAvailablePrefixes(cidr netip.Prefix) []netip.Prefix

func (*RIB) GetByLabel

func (rib *RIB) GetByLabel(selector labels.Selector) Routes

func (*RIB) GetTable

func (rib *RIB) GetTable() (r Routes)

func (*RIB) Iterate

func (rib *RIB) Iterate() *RIBIterator

func (*RIB) LPM

func (rib *RIB) LPM(cidr netip.Prefix) Routes

func (*RIB) Parents

func (rib *RIB) Parents(cidr netip.Prefix) (r Routes)

func (*RIB) Set

func (rib *RIB) Set(r Route) error

func (*RIB) Size

func (rib *RIB) Size() int

type RIBIterator

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

func (*RIBIterator) Next

func (i *RIBIterator) Next() bool

func (*RIBIterator) Route

func (i *RIBIterator) Route() Route

type Route

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

func NewRoute

func NewRoute(cidr netip.Prefix, l map[string]string, d map[string]any) Route

func (Route) Children

func (r Route) Children(rib *RIB) Routes

func (Route) DeleteData added in v0.0.3

func (r Route) DeleteData() Route

func (Route) DeleteLabels added in v0.0.5

func (r Route) DeleteLabels() Route

func (Route) Equal

func (r Route) Equal(r2 Route) bool

func (Route) Get

func (r Route) Get(label string) string

satisfy the k8s labels.Label interface

func (Route) GetAvailablePrefixByBitLen

func (r Route) GetAvailablePrefixByBitLen(rib *RIB, b uint8) netip.Prefix

func (Route) GetAvailablePrefixes

func (r Route) GetAvailablePrefixes(rib *RIB) []netip.Prefix

func (Route) GetData added in v0.0.3

func (r Route) GetData() map[string]any

func (Route) Has

func (r Route) Has(label string) bool

satisfy the k8s labels.Label interface

func (Route) Labels

func (r Route) Labels() labels.Set

func (Route) MarshalJSON

func (r Route) MarshalJSON() ([]byte, error)

Satisfy the json Interface.

func (Route) Parents

func (r Route) Parents(rib *RIB) Routes

func (Route) Prefix

func (r Route) Prefix() netip.Prefix

func (Route) SetData added in v0.0.3

func (r Route) SetData(d map[string]any) Route

func (Route) String

func (r Route) String() string

func (Route) UpdateLabel

func (r Route) UpdateLabel(label map[string]string) Route

type Routes

type Routes []Route

func (Routes) Len

func (r Routes) Len() int

func (Routes) Less

func (r Routes) Less(i, j int) bool

func (Routes) MarshalJSON

func (r Routes) MarshalJSON() ([]byte, error)

func (Routes) Swap

func (r Routes) Swap(i, j int)

Jump to

Keyboard shortcuts

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