func NewCluster(name string, rCfg Config, store store.Store) (*Cluster, error) {
	cd, _, err := store.GetClusterData(context.TODO())
	if err != nil {
		return nil, err
	} else if cd == nil {
		return nil, errors.New("no cluster data available")
	}
	return &Cluster{name: name, cd: cd, tagMasterAs: NewTags(rCfg.TagMasterAs), tagSlaveAs: NewTags(rCfg.TagSlaveAs)}, nil
}
NewCluster returns an new instance of Cluster
package register
import (
	"context"
	"errors"
	"github.com/sorintlab/stolon/internal/cluster"
	"github.com/sorintlab/stolon/internal/store"
)
type Cluster struct {
	name        string
	cd          *cluster.ClusterData
	tagMasterAs Tags
	tagSlaveAs  Tags
}