conduit

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 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 Conduit

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

func New

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

New is the constructor for the Conduit struct prefix - prefix of the conduit store - storage for the prefix and its childs (nodes) prefixLengths - prefix length used to allocate the childs (nodes)

func (*Conduit) GetNode

func (c *Conduit) GetNode(ctx context.Context, name string) (types.Node, error)

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

func (*Conduit) RemoveNode

func (c *Conduit) RemoveNode(ctx context.Context, name string) error

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

Jump to

Keyboard shortcuts

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