Пример #1
0
// delete master node
func deleteMaster(netplugin *plugin.NetPlugin, srvInfo core.ServiceInfo) error {
	// delete from the db
	delete(masterDB, masterKey(srvInfo))

	// tel plugin about it
	return netplugin.DeleteMaster(srvInfo)
}
Пример #2
0
// delete master node
func deleteMaster(netplugin *plugin.NetPlugin, srvInfo objdb.ServiceInfo) error {
	// delete from the db
	delete(MasterDB, masterKey(srvInfo))

	// tel plugin about it
	return netplugin.DeleteMaster(core.ServiceInfo{
		HostAddr: srvInfo.HostAddr,
		Port:     netmasterRPCPort,
	})
}