Documentation ¶
Index ¶
- func GetClusterdataBytes(ctx context.Context, client *clientv3.Client, key string) ([]byte, error)
- type Cluster
- type ClusterSpec
- type Clusterdata
- func (c Clusterdata) AsynchronousStandbys() []DB
- func (c Clusterdata) CheckHealthy(tolerateFailures int) error
- func (c Clusterdata) Databases() []DB
- func (c Clusterdata) ListenAddresses() []string
- func (c Clusterdata) Master() DB
- func (c Clusterdata) String() string
- func (c Clusterdata) SynchronousStandbys() []DB
- type DB
- type DBSpec
- type DBStatus
- type Proxy
- type ProxySpec
- type Stolonctl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cluster ¶
type Cluster struct {
Spec ClusterSpec `json:"spec"`
}
type ClusterSpec ¶
type Clusterdata ¶
type Clusterdata struct { Cluster `json:"cluster"` Proxy `json:"proxy"` Dbs map[string]DB `json:"dbs"` }
Clusterdata is a minimal extraction that we need from stolon. Whenever we upgrade stolon, we should verify that this definition is compatible.
func GetClusterdata ¶
GetClusterdata fetches and parses from etcd using the given key
func (Clusterdata) AsynchronousStandbys ¶
func (c Clusterdata) AsynchronousStandbys() []DB
func (Clusterdata) CheckHealthy ¶
func (c Clusterdata) CheckHealthy(tolerateFailures int) error
CheckHealthy returns an error if the stolon cluster isn't healthy. Healthy is defined as:
The master keeper is healthy, and The minimum number of synchronous standby keepers are healthy, and The number of healthy standbys (sync and async) - minimum number of synchronous standbys < the failure tolerance
func (Clusterdata) Databases ¶
func (c Clusterdata) Databases() []DB
func (Clusterdata) ListenAddresses ¶
func (c Clusterdata) ListenAddresses() []string
func (Clusterdata) Master ¶
func (c Clusterdata) Master() DB
func (Clusterdata) String ¶
func (c Clusterdata) String() string
func (Clusterdata) SynchronousStandbys ¶
func (c Clusterdata) SynchronousStandbys() []DB
SynchronousStandbys returns all the DBs that are configured as sync replicas to our current primary. If we use a dummy sync replica, then we'll return the empty DB value.
Click to show internal directories.
Click to hide internal directories.