Documentation ¶
Index ¶
- func Contains(s []string, e string) bool
- func CreateCfgFile(filename string) string
- func GetIP() ([]string, error)
- func ParsePid(path string) (int, error)
- type Cmd
- type Config
- type Interface
- type Microns
- type Node
- type Nodeconfig
- type Nodes
- type Switch
- type Switches
- type Sysctl
- type Test
- type TestCmd
- type Tn
- type TnInterface
- type Volume
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCfgFile ¶
CreateCfgFile func is Create Template config yaml file
Types ¶
type Config ¶
type Config struct {
Config []Nodeconfig `yaml:"node_config"`
}
Config struct is many NodeConfigs
type Interface ¶
type Interface struct { InfName string `yaml:"inf"` Type string `yaml:"type"` Ipv4 string `yaml:"ipv4"` Ipv6 string `yaml:"ipv6"` PeerNode string `yaml:"peernode"` PeerInf string `yaml:"peerinf"` }
Interface struct is Interface Config
type Microns ¶
type Microns struct { Nodes []Node `yaml:"nodes"` Switches []Switch `yaml:"switches"` NodeConfigs []Nodeconfig `yaml:"node_config"` Test []TestCmd `yaml:"test"` }
Microns struct is Microns config struct
type Node ¶
type Node struct { Name string `yaml:"name"` Image string `yaml:"image"` Interface []Interface `yaml:"interfaces"` Volumes []Volume `yaml:"volumes"` Sysctls []Sysctl `yaml:"sysctls"` }
Node struct is Node config
func ParseNodes ¶
ParseNodes func is parse nodes from microns config yaml file
type Nodeconfig ¶
Nodeconfig struct is Set NodeName and config Command
func ParseConfig ¶
func ParseConfig(filepath string) []Nodeconfig
ParseConfig func is parse node config from microns config yaml file
type Switch ¶
Switch struct is BridgeName and Interface settings
func ParseSwitch ¶
ParseSwitch func is parse switches from microns config yaml file
type Switches ¶
type Switches struct {
Switches []Switch `yaml:"switches"`
}
Switches struct is Bridge Settings
type Sysctl ¶
type Sysctl struct {
Sysctl string `yaml:"sysctl"`
}
Sysctl struct is configure sysctl for docker container
type Tn ¶
type Tn struct { Nodes []struct { Name string `yaml:"name"` Image string `yaml:"image"` Interfaces []struct { Name string `yaml:"name"` Type string `yaml:"type"` Args string `yaml:"args"` } `yaml:"interfaces"` } `yaml:"nodes"` Switches []struct { Name string `yaml:"name"` Interfaces []TnInterface `yaml:"interfaces"` } `yaml:"switches"` NodeConfigs []struct { Name string `yaml:"name"` Cmds []struct { Cmd string `yaml:"cmd"` } `yaml:"cmds"` } `yaml:"node_configs"` Test []struct { Name string `yaml:"name"` Cmds []struct { Cmd string `yaml:"cmd"` } `yaml:"cmds"` } `yaml:"test"` }
Tn struct is Tinet Config
type TnInterface ¶
type TnInterface struct { Name string `yaml:"name"` Type string `yaml:"type"` Args string `yaml:"args"` }
TnInterface struct is Tinet Interface config struct