flat

package
v0.0.0-...-6e18aa0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2015 License: Apache-2.0 Imports: 8 Imported by: 0

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 Flat

func Flat(ctx *cli.Context)

ctx.Args()[0] args are not the parameters, fmz。

func ParseParam

func ParseParam(ctx *cli.Context) error

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.

func VerifyParam

func VerifyParam()

Varify the parameter. TODO: remove

Types

This section is empty.

Jump to

Keyboard shortcuts

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