core

package
v0.0.0-...-918ceb5 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CtrlStatus

type CtrlStatus struct {
	Started bool
	Ready   bool
	Done    bool

	ReadyChan chan bool
	DoneChan  chan bool
}

func NewCtrlStatus

func NewCtrlStatus() *CtrlStatus

type LeafHealthManager

type LeafHealthManager struct {
	DoneChan chan bool
	// contains filtered or unexported fields
}

Tracks the health of its servers

func NewLeafHealthManager

func NewLeafHealthManager(leafID uint16,
	hmEgress chan *LeafHealthMsg,
	topology *model.Topology,
	vcMgr *VCManager,
	healthyNodeTimeOut int64) (*LeafHealthManager, error)

func (*LeafHealthManager) OnNodePingRecv

func (hm *LeafHealthManager) OnNodePingRecv(serverId, portId uint16)

Logic for receiving a ping pkt from a server

func (*LeafHealthManager) Start

func (hm *LeafHealthManager) Start()

type LeafHealthMsg

type LeafHealthMsg struct {
	Success bool
	Updated []*model.Node
}

func NewLeafHealthMsg

func NewLeafHealthMsg(success bool, updated []*model.Node) *LeafHealthMsg

type SpineHealthManager

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

func NewSpineHealthManager

func NewSpineHealthManager(hmEgress chan *SpineHealthMsg,
	topology *model.Topology,
	vcMgr *VCManager,
	healthyNodeTimeOut int64) (*SpineHealthManager, error)

func (*SpineHealthManager) OnLeafFailed

func (hm *SpineHealthManager) OnLeafFailed(leafID uint16)

Logic for handling when a leaf fails

func (*SpineHealthManager) Start

func (hm *SpineHealthManager) Start()

type SpineHealthMsg

type SpineHealthMsg struct {
	Success bool
}

func NewSpineHealthMsg

func NewSpineHealthMsg(success bool) *SpineHealthMsg

type VCManager

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

Manages all VCs in the system

func NewVCManager

func NewVCManager(topology *model.Topology) *VCManager

func (*VCManager) AddVC

func (vcm *VCManager) AddVC(vc *model.VirtualCluster) (bool, error)

Does not (and shouldn't) modify the topology

func (*VCManager) Debug

func (vcm *VCManager) Debug()

func (*VCManager) DetachLeaf

func (vcm *VCManager) DetachLeaf(leafID uint16) bool

Detaches a leaf from the VC Manager, and from every VC in the system

func (*VCManager) DetachServer

func (vcm *VCManager) DetachServer(serverID uint16) bool

Detaches a server from the VC Manager, and from every VC in the system

func (*VCManager) GetVC

func (vcm *VCManager) GetVC(clusterID uint16) *model.VirtualCluster

func (*VCManager) GetVCs

func (vcm *VCManager) GetVCs() []*model.VirtualCluster

func (*VCManager) GetVCsOfLeaf

func (vcm *VCManager) GetVCsOfLeaf(leafID uint16) ([]*model.VirtualCluster, bool)

Usage: get which VCs are impacted by a leaf failure

func (*VCManager) GetVCsOfServer

func (vcm *VCManager) GetVCsOfServer(serverID uint16) ([]*model.VirtualCluster, bool)

Usage: get which VCs are impacted by a server failure

func (*VCManager) RemoveVC

func (vcm *VCManager) RemoveVC(vc *model.VirtualCluster) (bool, error)

Does not (and shouldn't) modify the topology

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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