brtunsubrole

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: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InvalidTunnulPortID int = 4096
	VxlanPortOffset     int = 2
)

Variables

This section is empty.

Functions

func SetManager

func SetManager(managerURL, internalIP string) error

Types

type FlowMgrRole

type FlowMgrRole struct {
	FlowTableRole       FlowTableRole
	PortIDAllocatorRole PortIDAllocatorRole
	PortRole            brcomsubrole.PortRole
	PortList            []*TunPort
	NetList             []*TunNet
}

func GetFlowMgrSingleton

func GetFlowMgrSingleton() *FlowMgrRole

func (*FlowMgrRole) AddNetwork

func (this *FlowMgrRole) AddNetwork(networkID string, vni int, vlanID string) error

func (*FlowMgrRole) RemoveNetwork

func (this *FlowMgrRole) RemoveNetwork(netID string) error

func (*FlowMgrRole) Sync

func (this *FlowMgrRole) Sync(topo *dbaccessor.Sync) error

type FlowTableRole

type FlowTableRole struct {
	// contains filtered or unexported fields
}

func (FlowTableRole) Init

func (this FlowTableRole) Init()

func (FlowTableRole) Update

func (this FlowTableRole) Update(NetList []*TunNet, PortList []*TunPort)

type PortIDAllocatorRole

type PortIDAllocatorRole struct {
	// contains filtered or unexported fields
}

func (*PortIDAllocatorRole) Alloc

func (this *PortIDAllocatorRole) Alloc() int

func (*PortIDAllocatorRole) Free

func (this *PortIDAllocatorRole) Free(portID int) error

type SyncClientRole

type SyncClientRole struct {
	FlowMgrRole *FlowMgrRole
	Data        *dbaccessor.Sync
	Host        string
	API         string
	InternalIP  string
}

func (*SyncClientRole) HeartBeat

func (this *SyncClientRole) HeartBeat()

func (*SyncClientRole) Init

func (this *SyncClientRole) Init() error

func (*SyncClientRole) Sync

func (self *SyncClientRole) Sync() (*dbaccessor.Sync, error)

type TunMng

type TunMng interface {
	Sync(topo *dbaccessor.Sync) error
}

type TunNet

type TunNet struct {
	ID     string `json:"net_id"`
	Vni    int    `json:"vxlan_id"`
	VlanID string `json:"vlan_id"`
}

type TunPort

type TunPort struct {
	Agent *dbaccessor.Agent `json:"agent"`
	ID    int               `json:"port_id"`
	Name  string            `json:"port_name"`
}

Jump to

Keyboard shortcuts

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