示例#1
0
func (a *cfgMetaKvNodeDefsSplitHandler) del(
	c *CfgMetaKv, key string, cas uint64) error {
	delete(c.splitEntries, key)

	path := c.keyToPath(key)

	return metakv.RecursiveDelete(path + "/")
}
示例#2
0
func (c *CfgMetaKv) delUnlocked(key string, cas uint64) error {
	path := c.keyToPath(key)

	if cfgMetaKvSplitKeys[key] {
		return metakv.RecursiveDelete(path + "/")
	}

	rev, err := c.cfgMem.GetRev(key, cas)
	if err != nil {
		return err
	}

	err = metakv.Delete(path, rev)
	if err != nil {
		return err
	}

	return c.cfgMem.Del(key, 0)
}
示例#3
0
func (c *CfgMetaKv) DelConf() {
	metakv.RecursiveDelete(c.path)
}
示例#4
0
// RemoveAllKeys removes all cfg entries from metakv, where the caller
// should no longer use this CfgMetaKv instance, but instead create a
// new instance.
func (c *CfgMetaKv) RemoveAllKeys() {
	metakv.RecursiveDelete(c.prefix)
}