ovnplot

package
v0.0.0-...-31ff419 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mode

type Mode int
const (
	ModeOVN Mode
	ModeOVNKube
	ModeAuto
)

type NodeList

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

NodeList holds all nodes for a given graph.

func NewNodeList

func NewNodeList(g *dot.Graph) *NodeList

NewNodeList initializes a new node list.

func (*NodeList) DrawLevels

func (nl *NodeList) DrawLevels(level int)

DrawLevels draws the levels for the compact graph.

func (*NodeList) GetInvisible

func (nl *NodeList) GetInvisible(name string) dot.Node

func (*NodeList) GetLeaf

func (nl *NodeList) GetLeaf(name string) dot.Node

func (*NodeList) GetNode

func (nl *NodeList) GetNode(name string) dot.Node

GetNode retrieves a node or if it does not exist, creates it.

func (*NodeList) GetRouter

func (nl *NodeList) GetRouter(name string) dot.Node

func (*NodeList) GetSwitch

func (nl *NodeList) GetSwitch(name string) dot.Node

type OVNPlot

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

OVNPlot traverses the OVN database. In order to do so, it must connect to the OVN NB client which is stored in client.

func New

func New(ovnNBClient goovn.Client, mode Mode, filter string) (*OVNPlot, error)

func (*OVNPlot) CompactPlot

func (op *OVNPlot) CompactPlot() (string, error)

CompactPlot draws a compact plot of the OVN Northbound database. Ideal for an overview of more complex systems as it provides a cleaner design.

func (*OVNPlot) DetailedPlot

func (op *OVNPlot) DetailedPlot() (string, error)

DetailedPlot creates a detailed view of this OVN database.

type OvnKubeGraphNode

type OvnKubeGraphNode dot.Node

OvnKubeGraphNode is a custom type based on dot.Node. It allows us to define a standardized format for the different types, such as Switch(), Router(), Leaf(), Invisible().

func (OvnKubeGraphNode) Invisible

func (d OvnKubeGraphNode) Invisible() dot.Node

func (OvnKubeGraphNode) Leaf

func (d OvnKubeGraphNode) Leaf() dot.Node

func (OvnKubeGraphNode) Router

func (d OvnKubeGraphNode) Router() dot.Node

func (OvnKubeGraphNode) Switch

func (d OvnKubeGraphNode) Switch() dot.Node

Jump to

Keyboard shortcuts

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