Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // flat option FlaggwIP = cli.StringFlag{Name: "gateway", Usage: "IP of the default gateway."} FlagIP = cli.StringFlag{Name: "ip", Usage: "IP of the container"} FlagIF = cli.StringFlag{Name: "host-interface", Usage: "Host interface which create macvlan device"} FlagMTU = cli.IntFlag{Name: "mtu", Value: CliMTU, Usage: "the MTU of macvlan device"} FlagContainerName = cli.StringFlag{Name: "container-name", Usage: "the container name which want to config"} FlagEtcd = cli.StringFlag{Name: "etcd", Value: CliEtcd, Usage: "etcd endpoints"} )
the follew option will see in help doc. can set the default value;
View Source
var ( CliIP string //CIDR IP CliIF string // parent interface to the macvlan iface CligwIP string // this is the address of an external route CliMTU = 1500 // generally accepted default MTU CliCName string // the Docker container name which want to config CliEtcd string = "http://127.0.0.1:2379" )
flat config struct.
Functions ¶
func AddContainerNetworking ¶
func AddContainerNetworking()
netlink is not avaible in MAC OS, build fail.
func ParseParam ¶
log.fatalf will block the process and return errors. so the errors.new can be remove, or fmt.Errorf(). fmz. when no param pass, it will not equal "", because i set the value(default) first, fmz.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.