orchestrator

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConstellationInfo added in v0.2.0

type ConstellationInfo struct {
	Groups []GroupInfo
}

type GroupInfo added in v0.2.0

type GroupInfo struct {
	Group uint8
	Nodes []NodeInfo
}

type Host added in v0.2.0

type Host uint8

type ISL added in v0.2.0

type ISL struct {
	// Latency in microseconds
	Latency uint32
	// Bandwidth in bytes per second
	Bandwidth uint64
}
type Link struct {
	// Blocked is true if the link is blocked
	Blocked bool
	// Latency in microseconds
	Latency uint32
	// Bandwidth in bytes per second
	Bandwidth uint64

	// used for path reconstruction
	Next MachineID
}

func (Link) String added in v0.2.0

func (l Link) String() string

type MachineConfig added in v0.2.0

type MachineConfig struct {
	VCPUCount uint8
	// RAM in bytes
	RAM uint64
	// DiskSize in bytes
	DiskSize uint64
	// DiskImage is the path to the disk image
	DiskImage string
	// Kernel is the path to the kernel
	Kernel string
	// BootParams are the additional boot parameters
	BootParams []string
}

type MachineID added in v0.2.0

type MachineID struct {
	// is 0 for ground stations
	Group uint8
	Id    uint32
}

func (MachineID) String added in v0.2.0

func (m MachineID) String() string

type MachineState added in v0.2.0

type MachineState uint8
const (
	STOPPED MachineState = iota
	ACTIVE
)

type MachinesState added in v0.2.0

type MachinesState map[MachineID]MachineState

type NetworkState added in v0.2.0

type NetworkState map[MachineID]map[MachineID]*Link

func (NetworkState) String added in v0.2.0

func (n NetworkState) String() string

type NodeIDInfo added in v0.2.0

type NodeIDInfo struct {
	ID   MachineID
	Name string
}

type NodeInfo added in v0.2.0

type NodeInfo struct {
	ID     NodeIDInfo
	Active bool
}

type Orchestrator

type Orchestrator struct {
	// State is the description of the desired state of the emulation (as determined by simulation)
	State
	// contains filtered or unexported fields
}

func (*Orchestrator) GetResources added in v0.2.0

func (o *Orchestrator) GetResources() (availcpus uint32, availram uint64, err error)

func (*Orchestrator) InfoGetConstellation added in v0.2.0

func (o *Orchestrator) InfoGetConstellation() (ConstellationInfo, error)

func (*Orchestrator) InfoGetGroup added in v0.2.0

func (o *Orchestrator) InfoGetGroup(group uint8) (GroupInfo, error)

func (*Orchestrator) InfoGetIPAddressByID added in v0.2.0

func (o *Orchestrator) InfoGetIPAddressByID(id MachineID) (net.IP, error)

func (*Orchestrator) InfoGetIPAddressByName added in v0.2.0

func (o *Orchestrator) InfoGetIPAddressByName(name string) (net.IP, error)

func (*Orchestrator) InfoGetNodeByID added in v0.2.0

func (o *Orchestrator) InfoGetNodeByID(id MachineID) (NodeInfo, error)

func (*Orchestrator) InfoGetNodeByIP added in v0.2.0

func (o *Orchestrator) InfoGetNodeByIP(ip net.IP) (NodeInfo, error)

func (*Orchestrator) InfoGetNodeByName added in v0.2.0

func (o *Orchestrator) InfoGetNodeByName(name string) (NodeInfo, error)

func (*Orchestrator) InfoGetNodeNameByID added in v0.2.0

func (o *Orchestrator) InfoGetNodeNameByID(id MachineID) (string, error)

func (*Orchestrator) InfoGetPath added in v0.2.0

func (o *Orchestrator) InfoGetPath(source, destination MachineID) (PathInfo, error)

func (*Orchestrator) Initialize added in v0.2.0

func (o *Orchestrator) Initialize(machineList map[MachineID]MachineConfig, machineHosts map[MachineID]Host, machineNames map[MachineID]string) error

func (*Orchestrator) Stop added in v0.2.0

func (o *Orchestrator) Stop() error

func (*Orchestrator) Update added in v0.2.0

func (o *Orchestrator) Update(s *State) error

type PathInfo added in v0.2.0

type PathInfo struct {
	Source    MachineID
	Target    MachineID
	Latency   uint32
	Bandwidth uint64
	Segments  []SegmentInfo
	Blocked   bool
}

type SegmentInfo added in v0.2.0

type SegmentInfo struct {
	Source    MachineID
	Target    MachineID
	Latency   uint32
	Bandwidth uint64
}

type State added in v0.2.0

type State struct {
	NetworkState
	MachinesState
}

type VirtualizationBackend added in v0.2.0

type VirtualizationBackend interface {
	RegisterMachine(machine MachineID, name string, host Host, config MachineConfig) error
	BlockLink(source MachineID, target MachineID) error
	UnblockLink(source MachineID, target MachineID) error
	SetLatency(source MachineID, target MachineID, latency uint32) error
	SetBandwidth(source MachineID, target MachineID, bandwidth uint64) error
	StopMachine(machine MachineID) error
	StartMachine(machine MachineID) error
	GetIPAddress(id MachineID) (net.IPNet, error)
	ResolveIPAddress(ip net.IP) (MachineID, error)
	Stop() error
}

Jump to

Keyboard shortcuts

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