Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConduitWatcher ¶
func NewConduitWatcher(ctx context.Context, configurationManagerClient nspAPI.ConfigurationManagerClient, trenchName string, trenchWatchers []TrenchWatcher)
func SetConduits ¶ added in v1.0.1
func SetConduits(ctx context.Context, tw TrenchWatcher, currentConduits map[string]struct{}, newConduits []*nspAPI.Conduit)
SetConduits adds or removes the conduit in the trenchWatcher based on the differences between currentConduits and newConduits
Types ¶
type Trench ¶
func New ¶
func New(ctx context.Context, prefix types.Prefix, store types.Storage, prefixLengths *types.PrefixLengths) (*Trench, error)
New is the constructor for the Trench struct The constructor registers the trench to the store if not already registered in. prefix - prefix of the Trench store - storage for the prefix and its childs (conduit) prefixLengths - prefix length used to allocate the childs (conduit)
func (*Trench) AddConduit ¶
AddConduit returns the conduit with the name in parameter and with as parent the current trench. If not existing, a new one will be created and returned.
func (*Trench) GetConduit ¶
GetNode returns the node with the name in parameter and with as parent the current conduit. If not existing, a nil value is returned.