com

package
Version: v0.0.0-...-9649b88 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetBr0PortTableSingleton = func() Br0PortRepo {
	if br0PortTableSingleton != nil {
		return br0PortTableSingleton
	}

	br0PortTableSingletonLock.Lock()
	defer br0PortTableSingletonLock.Unlock()
	if br0PortTableSingleton == nil {
		br0PortTableSingleton = &Br0PortTable{
			make(map[string]interface{}),
			sync.RWMutex{},
			infra.DataPersister{DirName: "br0Bridge", FileName: "br0PortTable.dat"}}
	}
	return br0PortTableSingleton
}

Functions

This section is empty.

Types

type Br0PortRepo

type Br0PortRepo interface {
	Load() error
	memtbl.MemTblOp
}

type Br0PortTable

type Br0PortTable struct {
	// key: br0VethName
	// value: br0PortValue
	Br0PortMap map[string]interface{}
	// contains filtered or unexported fields
}

func (*Br0PortTable) Delete

func (this *Br0PortTable) Delete(key string) error

key: br0VethName

func (*Br0PortTable) Get

func (this *Br0PortTable) Get(key string) (interface{}, error)

key: br0VethName

func (*Br0PortTable) GetAll

func (this *Br0PortTable) GetAll() (map[string]interface{}, error)

func (*Br0PortTable) Insert

func (this *Br0PortTable) Insert(key string, value interface{}) error

key: br0VethName, value: br0PortValue{TenantNetworkId{tanentId, networkPlane, networkId}, portId} func (this *br0PortTable) Insert(br0VethName, tanentId, networkPlane, networkId, portId string) error {

func (*Br0PortTable) Load

func (this *Br0PortTable) Load() error

type Br0PortValue

type Br0PortValue struct {
	TenantNetID TenantNetworkID `json:"tenant_network_id"`
	PortID      string          `json:"port_id"`
}

type TenantNetworkID

type TenantNetworkID struct {
	TenantID     string `json:"tenant_id"`
	NetworkPlane string `json:"network_plane"`
	NetworkID    string `json:"network_id"`
}

Jump to

Keyboard shortcuts

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