func NewCatalogNodesQuery(s string) (*CatalogNodesQuery, error) {
	if !CatalogNodesQueryRe.MatchString(s) {
		return nil, fmt.Errorf("catalog.nodes: invalid format: %q", s)
	}

	m := regexpMatch(CatalogNodesQueryRe, s)
	return &CatalogNodesQuery{
		dc:     m["dc"],
		near:   m["near"],
		stopCh: make(chan struct{}, 1),
	}, nil
}
func NewCatalogNodesQuery(s string) (*CatalogNodesQuery, error) {
	if !CatalogNodesQueryRe.MatchString(s) {
		return nil, fmt.Errorf("catalog.nodes: invalid format: %q", s)
	}

	m := regexpMatch(CatalogNodesQueryRe, s)
	return &CatalogNodesQuery{
		dc:     m["dc"],
		near:   m["near"],
		stopCh: make(chan struct{}, 1),
	}, nil
}
// NewCatalogNodesQuery parses the given string into a dependency. If the name is
// empty then the name of the local agent is used.