aclidx

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2018 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AclIdxDto

type AclIdxDto struct {
	idxvpp.NameToIdxDtoWithoutMeta
	Metadata *acl_model.AccessLists_Acl
}

AclIdxDto represents an item sent through watch channel in aclIndex. In contrast to NameToIdxDto, it contains typed metadata.

type AclIndex

type AclIndex interface {
	// GetMapping returns internal read-only mapping with metadata.
	GetMapping() idxvpp.NameToIdxRW

	// LookupIdx looks up previously stored item identified by index in mapping.
	LookupIdx(name string) (idx uint32, metadata *acl_model.AccessLists_Acl, exists bool)

	// LookupName looks up previously stored item identified by name in mapping.
	LookupName(idx uint32) (name string, metadata *acl_model.AccessLists_Acl, exists bool)

	// WatchNameToIdx allows to subscribe for watching changes in aclIndex mapping.
	WatchNameToIdx(subscriber core.PluginName, pluginChannel chan AclIdxDto)
}

AclIndex provides read-only access to mapping between ACL indices (used internally in VPP) and ACL names.

type AclIndexRW

type AclIndexRW interface {
	AclIndex

	// RegisterName adds a new item into name-to-index mapping.
	RegisterName(name string, idx uint32, ifMeta *acl_model.AccessLists_Acl)

	// UnregisterName removes an item identified by name from mapping.
	UnregisterName(name string) (idx uint32, metadata *acl_model.AccessLists_Acl, exists bool)
}

AclIndexRW is mapping between ACL indices (used internally in VPP) and ACL names.

func NewAclIndex

func NewAclIndex(mapping idxvpp.NameToIdxRW) AclIndexRW

NewAclIndex creates new instance of swIfIndex.

Jump to

Keyboard shortcuts

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