models

package
v0.0.0-...-10ac0cf Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CapacityBlock

type CapacityBlock struct {
	Name   string   `yaml:"name"`
	Type   string   `yaml:"type"`
	NVLink string   `yaml:"nvlink,omitempty"`
	Nodes  []string `yaml:"nodes"`
}

type Model

type Model struct {
	Switches       []*Switch        `yaml:"switches"`
	CapacityBlocks []*CapacityBlock `yaml:"capacity_blocks"`

	// derived
	Nodes map[string]*Node
}

func NewModelFromFile

func NewModelFromFile(fname string) (*Model, error)

func (*Model) ToGraph

func (model *Model) ToGraph() (*topology.Vertex, map[string]string)

type Node

type Node struct {
	Name          string
	Metadata      map[string]string
	Type          string
	NVLink        string
	NetLayers     []string
	CapacityBlock string
}

type Switch

type Switch struct {
	Name           string            `yaml:"name"`
	Metadata       map[string]string `yaml:"metadata"`
	Switches       []string          `yaml:"switches"`
	CapacityBlocks []string          `yaml:"capacity_blocks"`
}

Jump to

Keyboard shortcuts

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