func (e *ListRulesExecutor) Execute(t *Task) (err error) { helper.SetRouterRoot(e.arg.Internal) e.reply.Rules, err = routerzk.ListRules(datamodel.Zk.Conn) if err != nil { e.reply.Status = StatusError } else { sort.Strings(e.reply.Rules) e.reply.Status = StatusOk } return err }
func ListRules() ([]string, error) { return routerzk.ListRules(zkConn.Conn) }