Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IndexMetadata ¶
IndexMetadata creates indexes for metadata. Index for IPAddress will be created
Types ¶
type BDIndex ¶
type BDIndex interface { // GetMapping returns internal read-only mapping with metadata of type interface{}. GetMapping() idxvpp.NameToIdxRW // LookupIdx looks up previously stored item identified by index in mapping. LookupIdx(name string) (idx uint32, metadata *l2.BridgeDomains_BridgeDomain, exists bool) // LookupName looks up previously stored item identified by name in mapping. LookupName(idx uint32) (name string, metadata *l2.BridgeDomains_BridgeDomain, exists bool) // LookupNameByIP returns names of items that contains given IP address in metadata LookupNameByIfaceName(ifaceName string) []string // WatchNameToIdx allows to subscribe for watching changes in bdIndex mapping WatchNameToIdx(subscriber core.PluginName, pluginChannel chan ChangeDto) }
BDIndex provides read-only access to mapping between indexes (used internally in VPP) and Bridge Domain names.
type BDIndexRW ¶
type BDIndexRW interface { BDIndex // RegisterName adds new item into name-to-index mapping. RegisterName(name string, idx uint32, ifMeta *l2.BridgeDomains_BridgeDomain) // UnregisterName removes an item identified by name from mapping UnregisterName(name string) (idx uint32, metadata *l2.BridgeDomains_BridgeDomain, exists bool) }
BDIndexRW is mapping between indexes (used internally in VPP) and Bridge Domain names.
func NewBDIndex ¶
func NewBDIndex(mapping idxvpp.NameToIdxRW) BDIndexRW
NewBDIndex creates new instance of bdIndex.
type ChangeDto ¶
type ChangeDto struct { idxvpp.NameToIdxDtoWithoutMeta Metadata *l2.BridgeDomains_BridgeDomain }
ChangeDto represents an item sent through watch channel in bdIndex. In contrast to NameToIdxDto it contains typed metadata.
Click to show internal directories.
Click to hide internal directories.