Documentation ¶
Index ¶
- Constants
- func NewCommands() engines.ClusterCommands
- func NewManager(properties engines.Properties) (engines.DBManager, error)
- type Commands
- type Config
- type Manager
- func (mgr *Manager) Failover(ctx context.Context, cluster *dcs.Cluster, candidate string) error
- func (mgr *Manager) GetDBConnWithMember(cluster *dcs.Cluster, member *dcs.Member) (db *sql.DB, err error)
- func (mgr *Manager) GetReplicaRole(ctx context.Context, _ *dcs.Cluster) (string, error)
- func (mgr *Manager) InitializeCluster(context.Context, *dcs.Cluster) error
- func (mgr *Manager) IsLeader(ctx context.Context, cluster *dcs.Cluster) (bool, error)
- func (mgr *Manager) Switchover(ctx context.Context, cluster *dcs.Cluster, primary, candidate string, ...) error
Constants ¶
View Source
const ( Role = "ROLE" CurrentLeader = "CURRENT_LEADER" PRIMARY = "PRIMARY" STANDBY = "STANDBY" )
Variables ¶
This section is empty.
Functions ¶
func NewCommands ¶
func NewCommands() engines.ClusterCommands
func NewManager ¶
func NewManager(properties engines.Properties) (engines.DBManager, error)
Types ¶
type Commands ¶
type Commands struct {
// contains filtered or unexported fields
}
func (*Commands) ConnectCommand ¶
func (*Commands) ConnectExample ¶
func (r *Commands) ConnectExample(info *engines.ConnectionInfo, client string) string
type Manager ¶
func (*Manager) GetDBConnWithMember ¶
func (mgr *Manager) GetDBConnWithMember(cluster *dcs.Cluster, member *dcs.Member) (db *sql.DB, err error)
GetDBConnWithMember retrieves a database connection for a specific member of a cluster.
func (*Manager) GetReplicaRole ¶
func (*Manager) InitializeCluster ¶
Click to show internal directories.
Click to hide internal directories.