Versions in this module Expand all Collapse all v0 v0.0.3 Feb 7, 2022 v0.0.2 Jan 16, 2022 Changes in this version + type ProxySQLAdmin struct + Conn *sql.DB + func NewProxySQLAdmin(dsn DSN) (t *ProxySQLAdmin, err error) + func (t *ProxySQLAdmin) AddMysqlServers(ctx context.Context, servers []*TableMysqlServers) (err error) + func (t *ProxySQLAdmin) AddMysqlUsers(ctx context.Context, users []*TableMysqlUsers) (err error) + func (t *ProxySQLAdmin) AddProxySQLServers(ctx context.Context, servers []*TableProxySQLServers) (err error) + func (t *ProxySQLAdmin) Begin(ctx context.Context) (err error) + func (t *ProxySQLAdmin) Close() error + func (t *ProxySQLAdmin) Commit(ctx context.Context) (err error) + func (t *ProxySQLAdmin) GetMysqlServers(ctx context.Context) (data []*TableMysqlServers, err error) + func (t *ProxySQLAdmin) GetMysqlUsers(ctx context.Context) (data []*TableMysqlUsers, err error) + func (t *ProxySQLAdmin) GetProxySQLServers(ctx context.Context) (data []*TableProxySQLServers, err error) + func (t *ProxySQLAdmin) LoadAdminVariablesToRuntime(ctx context.Context) (err error) + func (t *ProxySQLAdmin) LoadMysqlServersToRuntime(ctx context.Context) (err error) + func (t *ProxySQLAdmin) LoadMysqlUsersServersToRuntime(ctx context.Context) (err error) + func (t *ProxySQLAdmin) LoadProxySQLServersToRuntime(ctx context.Context) (err error) + func (t *ProxySQLAdmin) RemoveMysqlServer(ctx context.Context, hostname string) (err error) + func (t *ProxySQLAdmin) RemoveMysqlUser(ctx context.Context, username string, frontend bool) (err error) + func (t *ProxySQLAdmin) RemoveProxySQLServer(ctx context.Context, hostname string) (err error) + func (t *ProxySQLAdmin) Rollback(ctx context.Context) (err error) type ProxySQLConfWriter + MysqlGroupReplicationHostgroups []map[string]string + MysqlReplicationHostgroups []map[string]string + ProxySQLServers []map[string]string + type TableMysqlServers struct + Comment string + Compression bool + GTIDPort int + HostGroupID int + Hostname string + MaxConnections int + MaxLatencyMS int + MaxReplicationLag int + Port int + Status string + UseSSL bool + Weight int + type TableMysqlUsers struct + Active bool + Attributes string + Backend bool + Comment string + DefaultHostgroup int + DefaultSchema sql.NullString + FastForward bool + Frontend bool + MaxConnections int + Password string + SchemaLocked bool + TransactionPersistent bool + UseSSL bool + Username string + type TableProxySQLServers struct + Comment string + Hostname string + Port int + Weight int v0.0.1 Oct 5, 2021 Changes in this version + func NewDBFromDSN(opts *DSN) (db *sql.DB, err error) + type ClusterManager interface + FindMaster func(ctx context.Context) (masters []*DSN, err error) + HealthyMembers func(ctx context.Context) (members []*DSN) + StartCluster func(ctx context.Context) (err error) + type ConfigParser struct + Data map[string]*ConfigSection + func NewConfigParser() (t *ConfigParser) + func (t *ConfigParser) DeleteSection(sectionName string, section *ConfigSection) + func (t *ConfigParser) GetSection(sectionName string) (section *ConfigSection, err error) + func (t *ConfigParser) MergeSection(section *ConfigSection) (err error) + func (t *ConfigParser) Parse(r io.Reader) (err error) + func (t *ConfigParser) ParseFile(configFile string) (err error) + func (t *ConfigParser) SetSection(section *ConfigSection) + func (t *ConfigParser) String() (s string) + type ConfigSection struct + Data map[string]string + Name string + func NewConfigSection(name string) (t *ConfigSection) + func (t *ConfigSection) Delete(key string) + func (t *ConfigSection) Get(key string) (s string, err error) + func (t *ConfigSection) Set(key, value string) + func (t *ConfigSection) String() (s string) + type DSN struct + DBName string + Host string + Password string + Port int + Username string + type MGRSP struct + DataSrouces []*DSN + func (t *MGRSP) FindMaster(ctx context.Context) (masters []*DSN, err error) + func (t *MGRSP) HealthyMembers(ctx context.Context) (members []*DSN) + func (t *MGRSP) StartCluster(ctx context.Context) (err error) + type ProxySQLConfWriter struct + AdminVariables map[string]string + Datadir string + MysqlQueryRules []map[string]string + MysqlServers []map[string]string + MysqlUsers []map[string]string + MysqlVariables map[string]string + Scheduler []map[string]string + func (t *ProxySQLConfWriter) String() (conf string) + type SemiSync struct + DataSrouces []*DSN + DoubleMasterHA bool + func (t *SemiSync) FindMaster(ctx context.Context) (masters []*DSN, err error) + func (t *SemiSync) HealthyMembers(ctx context.Context) (members []*DSN) + func (t *SemiSync) StartCluster(ctx context.Context) (err error)