Beispiel #1
0
func DeleteTrie(name string) error {
	if name == "" {
		return errors.New("Please specify a name")
	}

	return routerzk.DelTrie(zkConn.Conn, name)
}
Beispiel #2
0
func (e *DeleteTrieExecutor) Execute(t *Task) (err error) {
	if e.arg.Name == "" {
		return errors.New("Please specify a name")
	}
	helper.SetRouterRoot(e.arg.Internal)
	err = routerzk.DelTrie(datamodel.Zk.Conn, e.arg.Name)
	if err != nil {
		e.reply.Status = StatusError
	} else {
		e.reply.Status = StatusOk
	}
	return err
}