cmd

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigCmd

type ConfigCmd struct {
	Path   string `kong:"arg,type='existingFile',help='Path to configuration file'"`
	DryRun bool   `kong:"optional,help='Perform a dry run of the configuration'"`
}

ConfigCmd can configure a fabric per a pre-defined configuration file.

func (*ConfigCmd) Run

func (cmd *ConfigCmd) Run() error

Run will run the Config command.

type ConfigFile

type ConfigFile struct {
	Version  string
	Metadata struct {
		Name string
	}
	Options []Option `yaml:",omitempty"`
	Devices []Device
}

ConfigFile is the top-level structure

type Device

type Device struct {
	ID       int32
	Metadata struct {
		Name string
	}
	Domains   []Domain
	Endpoints []uint8 `yaml:",flow"`
}

Device referes to a Switchtec device. It can have a series of Domains and any number of End-Points.

type Domain

type Domain struct {
	// Name identifies the Domain name. Domain names can be shared across different
	// devices or unique to a single Device.
	Name string

	// Port is the Upstream Port (USP) of the Domain. End-points are bound to
	// this port.
	Port uint8
}

Domain referes to the Host Virtualization Domain.

type Option

type Option map[string]string

Option can be any key:value string pair applied to the configuration file.

Jump to

Keyboard shortcuts

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