topology

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UndefinedNetwork NetworkType = ""
	// UserNetwork is a network in the user space (SDN)
	UserNetwork = "user"
	// KernelNetwork is a network in kernel space (Linux networking)
	KernelNetwork = "kernel"
)
View Source
const (
	UnknownEndpointType EndpointType = ""
	InterfaceEndpoint                = "interface"
	FileEndpoint                     = "file"
)

Variables

This section is empty.

Functions

func PrintTopologyDot

func PrintTopologyDot(w io.Writer, instances []*vpp.Instance, info *Info) error

Types

type Connection

type Connection struct {
	Source      Endpoint
	Destination Endpoint
	Metadata    map[string]string
}

Connection defines a connection between two endpoints. It is represented as an edge.

func (Connection) String

func (c Connection) String() string

type Endpoint

type Endpoint struct {
	Network
	Interface string
	Kind      EndpointType
	Metadata  map[string]string
}

Endpoint defines a communication endpoint in a network.

type EndpointType

type EndpointType string

type Info

type Info struct {
	Networks    []Network
	Connections []Connection
}

Info groups together a topology information.

func Build

func Build(instances []*vpp.Instance) (*Info, error)

type Network

type Network struct {
	// Instance is the name of instance this network is part of.
	Instance string
	// Type is the type of this network.
	Type NetworkType
	// Namespace is the name of namespace this network belongs to.
	// If empty, default network is assumed.
	Namespace string
}

Network defines a particular network in topology.

type NetworkType

type NetworkType string

NetworkType is a type of network found in a topology.

Jump to

Keyboard shortcuts

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