aclidx

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2018 License: Apache-2.0 Imports: 4 Imported by: 80

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)

	// Clear removes all ACL entries from the mapping.
	Clear()
}

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 aclIndex.

Jump to

Keyboard shortcuts

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