xrvn

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CPU

type CPU struct {
	Cores int `json:"cores"`
}

type Config

type Config struct {
	MaxMemory int `yaml:"MaxMemory"`
	MaxCore   int `yaml:"MaxCore"`
}

type Endpoint

type Endpoint struct {
	Name string `json:"name"`
	Port int    `json:"port"`
}
type Link struct {
	Name      string      `json:"name"`
	Endpoints [2]Endpoint `json:"endpoints"`
}

type Memory

type Memory struct {
	Capacity Unit `json:"capacity"`
}

type Mount

type Mount struct {
	Source string `json:"source"`
	Point  string `json:"point"`
}

type Node

type Node struct {
	Name     string  `json:"name"`
	OS       string  `json:"os"`
	Image    string  `json:"image,omitempty"`
	CPU      *CPU    `json:"cpu,omitempty"`
	Memory   *Memory `json:"memory,omitempty"`
	Mounts   []Mount `json:"mounts,omitempty"`
	Ebpf     bool    `json:"ebpf"`
	Emulator string  `json:"emulator"`
}

type Topo

type Topo struct {
	Name     string `json:"name"`
	Nodes    []Node `json:"nodes"`
	Switches []Node `json:"switches"`
	Links    []Link `json:"links"`
	// contains filtered or unexported fields
}

func NewTopo

func NewTopo() *Topo

func (*Topo) NextPort

func (t *Topo) NextPort(node string) int

type Unit

type Unit struct {
	Value int    `json:"value"`
	Unit  string `json:"unit"`
}

Jump to

Keyboard shortcuts

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