oceanbase

package
v0.8.2-beta.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2024 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

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 (r *Commands) ConnectCommand(connectInfo *engines.AuthInfo) []string

func (*Commands) ConnectExample

func (r *Commands) ConnectExample(info *engines.ConnectionInfo, client string) string

func (*Commands) Container

func (r *Commands) Container() string

func (*Commands) ExecuteCommand

func (r *Commands) ExecuteCommand(scripts []string) ([]string, []corev1.EnvVar, error)

type Config

type Config struct {
	*mysql.Config
}

func NewConfig

func NewConfig(properties map[string]string) (*Config, error)

type Manager

type Manager struct {
	mysql.Manager
	ReplicaTenant string
}

func (*Manager) Failover

func (mgr *Manager) Failover(ctx context.Context, cluster *dcs.Cluster, candidate string) error

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 (mgr *Manager) GetReplicaRole(ctx context.Context, _ *dcs.Cluster) (string, error)

func (*Manager) InitializeCluster

func (mgr *Manager) InitializeCluster(context.Context, *dcs.Cluster) error

func (*Manager) IsLeader

func (mgr *Manager) IsLeader(ctx context.Context, cluster *dcs.Cluster) (bool, error)

func (*Manager) Switchover

func (mgr *Manager) Switchover(ctx context.Context, cluster *dcs.Cluster, primary, candidate string, force bool) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL