示例#1
0
func handleGlobalCfgEvents(netPlugin *plugin.NetPlugin, opts core.InstanceInfo, recvErr chan error) {

	rsps := make(chan core.WatchState)
	go processStateEvent(netPlugin, opts, rsps)
	cfg := mastercfg.GlobConfig{}
	cfg.StateDriver = netPlugin.StateDriver
	recvErr <- cfg.WatchAll(rsps)
	return
}
示例#2
0
//GetFwdMode returns the fabric forwarding mode
func GetFwdMode(stateDriver core.StateDriver) string {

	gCfg := mastercfg.GlobConfig{}
	gCfg.StateDriver = stateDriver
	err := gCfg.Read("")
	if err != nil {
		core.Errorf("Error reading forwarding mode from cluster store")
		return ""
	}
	return gCfg.FwdMode

}