Exemple #1
0
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
}
Exemple #2
0
func ListPorts() ([]uint16, error) {

	return routerzk.ListPorts(zkConn.Conn)
}