Example #1
0
func (zkts *Server) GetKnownCells() ([]string, error) {
	cellsWithGlobal := zk.ZkKnownCells(false)
	cells := make([]string, 0, len(cellsWithGlobal))
	for _, cell := range cellsWithGlobal {
		if cell != "global" {
			cells = append(cells, cell)
		}
	}
	return cells, nil
}
Example #2
0
func (zkts *Server) GetKnownCells() ([]string, error) {
	cellsWithGlobal, err := zk.ZkKnownCells(false)
	if err != nil {
		return cellsWithGlobal, err
	}
	cells := make([]string, 0, len(cellsWithGlobal))
	for _, cell := range cellsWithGlobal {
		if cell != "global" {
			cells = append(cells, cell)
		}
	}
	sort.Strings(cells)
	return cells, nil
}