node

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	types.Prefix
	Store         types.Storage
	PrefixLengths *types.PrefixLengths
}

func New

func New(prefix types.Prefix, store types.Storage, prefixLengths *types.PrefixLengths) *Node

New is the constructor for the Node struct prefix - prefix of the Node store - storage for the prefix and its childs (target, LB, Bridge...) prefixLengths - prefix length used to allocate the childs (target, LB, Bridge...)

func (*Node) Allocate

func (n *Node) Allocate(ctx context.Context, name string) (types.Prefix, error)

Allocate returns the prefix with the name in parameter and with as parent the current node. If not existing, a new one will be created and returned.

func (*Node) Release

func (n *Node) Release(ctx context.Context, name string) error

Release removes the prefix with the name in parameter and with as parent the current node. no error is returned if the prefix does not exist.

Jump to

Keyboard shortcuts

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