示例#1
0
文件: main.go 项目: blablacar/dgr
func main() {
	if len(os.Args) > 1 && os.Args[1] == "daemon" {
		runDaemon()
	} else {
		skel.PluginMain(cmdAdd, cmdDel)
	}
}
示例#2
0
func main() {

	// Display the version on "-v", otherwise just delegate to the skel code.
	// Use a new flag set so as not to conflict with existing libraries which use "flag"
	flagSet := flag.NewFlagSet("calico-ipam", flag.ExitOnError)

	version := flagSet.Bool("v", false, "Display version")
	err := flagSet.Parse(os.Args[1:])

	if err != nil {
		fmt.Println(err)
		os.Exit(1)
	}

	if *version {
		fmt.Println(VERSION)
		os.Exit(0)
	}

	skel.PluginMain(cmdAdd, cmdDel)
}
示例#3
0
文件: macvlan.go 项目: achanda/cni
func main() {
	skel.PluginMain(cmdAdd, cmdDel, version.Legacy)
}
示例#4
0
文件: macvlan.go 项目: blablacar/dgr
func main() {
	skel.PluginMain(cmdAdd, cmdDel)
}
示例#5
0
func main() {
	rand.Seed(time.Now().UTC().UnixNano())
	p := NewCNIPlugin(cniserver.CNIServerSocketPath)
	skel.PluginMain(p.skelCmdAdd, p.CmdDel, version.Legacy)
}
示例#6
0
func main() {
	p := NewCNIPlugin(cniserver.CNIServerSocketPath)
	skel.PluginMain(p.skelCmdAdd, p.CmdDel, version.Legacy)
}
示例#7
0
func main() {
	skel.PluginMain(cmdAdd, cmdDel, version.PluginSupports("0.1.0", "0.2.0"))
}