func (e *ListPortsExecutor) Execute(t *Task) (err error) { helper.SetRouterRoot(e.arg.Internal) e.reply.Ports, err = routerzk.ListPorts(datamodel.Zk.Conn) if err == nil { sort.Sort(PortSortable(e.reply.Ports)) } return err }
func ListPorts() ([]uint16, error) { return routerzk.ListPorts(zkConn.Conn) }