gencfg

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenNMCfg

func GenNMCfg(NMCinfigPath string, enableP2P bool, printExample bool) (err error)

func GenSuperCfg

func GenSuperCfg(SMCinfigPath string, printExample bool) (err error)

func GetExampleEdgeConf

func GetExampleEdgeConf(templatePath string, getDemo bool) (mtypes.EdgeConfig, error)

func GetExampleSuperConf

func GetExampleSuperConf(templatePath string, getDemo bool) (mtypes.SuperConfig, error)

func ParseIDs

func ParseIDs(s string) ([]int, int, int, error)

Types

type NMCfg

type NMCfg struct {
	ConfigOutputDir    string `yaml:"Config output dir"`
	EdgeConfigTemplate string `yaml:"ConfigTemplate for edge node"`
	NetworkName        string `yaml:"Network name"`
	EdgeNode           struct {
		MacPrefix   string `yaml:"MacAddress prefix"`
		IPv4Range   string `yaml:"IPv4 range"`
		IPv6Range   string `yaml:"IPv6 range"`
		IPv6LLRange string `yaml:"IPv6 LL range"`
	} `yaml:"Edge Node"`
	EdgeNodes      map[mtypes.Vertex]edge_raw_info `yaml:"Edge Nodes"`
	DistanceMatrix string                          `yaml:"Distance matrix for all nodes"`
}

type SMCfg

type SMCfg struct {
	ConfigOutputDir     string `yaml:"Config output dir"`
	SuperConfigTemplate string `yaml:"ConfigTemplate for super node"`
	EdgeConfigTemplate  string `yaml:"ConfigTemplate for edge node"`
	NetworkName         string `yaml:"Network name"`
	Supernode           struct {
		ListenPort       int    `yaml:"Listen port"`
		EdgeAPI_Prefix   string `yaml:"EdgeAPI prefix"`
		EndpointV4       string `yaml:"Endpoint(IPv4)(optional)"`
		EndpointV6       string `yaml:"Endpoint(IPv6)(optional)"`
		Endpoint_EdgeAPI string `yaml:"Endpoint(EdgeAPI)"`
	} `yaml:"Super Node"`
	EdgeNode struct {
		NodeIDs     string `yaml:"Node IDs"`
		MacPrefix   string `yaml:"MacAddress prefix"`
		IPv4Range   string `yaml:"IPv4 range"`
		IPv6Range   string `yaml:"IPv6 range"`
		IPv6LLRange string `yaml:"IPv6 LL range"`
	} `yaml:"Edge Node"`
}

Jump to

Keyboard shortcuts

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