Example #1
0
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
}
Example #2
0
func ListRules() ([]string, error) {

	return routerzk.ListRules(zkConn.Conn)
}