aclidx

package
v2.0.0-alpha+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACLIndex added in v1.8.1

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 string, pluginChannel chan IdxDto)
}

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

type ACLIndexRW added in v1.8.1

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 added in v1.8.1

func NewACLIndex(mapping idxvpp.NameToIdxRW) ACLIndexRW

NewACLIndex creates new instance of aclIndex.

type IdxDto added in v1.8.1

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

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

Jump to

Keyboard shortcuts

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