Versions in this module Expand all Collapse all v1 v1.0.55 Jan 12, 2024 v1.0.54 Oct 21, 2023 Changes in this version + const DefaultInstancePort + const MaxReplicationPasswordLength + const MaxTableNameLength + func GetDB(migrationUuid string, mysql_uri string) (*gosql.DB, bool, error) + func GetReplicationBinlogCoordinates(db *gosql.DB) (readBinlogCoordinates *BinlogCoordinates, ...) + func GetReplicationLagFromSlaveStatus(informationSchemaDb *gosql.DB) (replicationLag time.Duration, err error) + func GetTableColumns(db *gosql.DB, databaseName, tableName string) (*sql.ColumnList, *sql.ColumnList, error) + type BinlogCoordinates struct + LogFile string + LogPos int64 + Type BinlogType + func GetSelfBinlogCoordinates(db *gosql.DB) (selfBinlogCoordinates *BinlogCoordinates, err error) + func ParseBinlogCoordinates(logFileLogPos string) (*BinlogCoordinates, error) + func (this *BinlogCoordinates) DetachedCoordinates() (isDetached bool, detachedLogFile string, detachedLogPos string) + func (this *BinlogCoordinates) DisplayString() string + func (this *BinlogCoordinates) Equals(other *BinlogCoordinates) bool + func (this *BinlogCoordinates) FileNumber() (int, int) + func (this *BinlogCoordinates) FileNumberDistance(other *BinlogCoordinates) int + func (this *BinlogCoordinates) FileSmallerThan(other *BinlogCoordinates) bool + func (this *BinlogCoordinates) IsEmpty() bool + func (this *BinlogCoordinates) NextFileCoordinates() (BinlogCoordinates, error) + func (this *BinlogCoordinates) PreviousFileCoordinates() (BinlogCoordinates, error) + func (this *BinlogCoordinates) PreviousFileCoordinatesBy(offset int) (BinlogCoordinates, error) + func (this *BinlogCoordinates) SmallerThan(other *BinlogCoordinates) bool + func (this *BinlogCoordinates) SmallerThanOrEquals(other *BinlogCoordinates) bool + func (this BinlogCoordinates) String() string + type BinlogType int + const BinaryLog + const RelayLog + type ConnectionConfig struct + ImpliedKey *InstanceKey + Key InstanceKey + Password string + User string + func GetMasterConnectionConfigSafe(connectionConfig *ConnectionConfig, visitedKeys *InstanceKeyMap, ...) (masterConfig *ConnectionConfig, err error) + func NewConnectionConfig() *ConnectionConfig + func (this *ConnectionConfig) Duplicate() *ConnectionConfig + func (this *ConnectionConfig) DuplicateCredentials(key InstanceKey) *ConnectionConfig + func (this *ConnectionConfig) Equals(other *ConnectionConfig) bool + func (this *ConnectionConfig) GetDBUri(databaseName string) string + func (this *ConnectionConfig) String() string + func (this *ConnectionConfig) TLSConfig() *tls.Config + func (this *ConnectionConfig) UseTLS(caCertificatePath string, allowInsecure bool) error + type InstanceKey struct + Hostname string + Port int + func GetInstanceKey(db *gosql.DB) (instanceKey *InstanceKey, err error) + func GetMasterKeyFromSlaveStatus(connectionConfig *ConnectionConfig) (masterKey *InstanceKey, err error) + func NewRawInstanceKey(hostPort string) (*InstanceKey, error) + func ParseRawInstanceKeyLoose(hostPort string) (*InstanceKey, error) + func (this *InstanceKey) DetachedKey() *InstanceKey + func (this *InstanceKey) DisplayString() string + func (this *InstanceKey) Equals(other *InstanceKey) bool + func (this *InstanceKey) IsDetached() bool + func (this *InstanceKey) IsValid() bool + func (this *InstanceKey) ReattachedKey() *InstanceKey + func (this *InstanceKey) SmallerThan(other *InstanceKey) bool + func (this *InstanceKey) StringCode() string + func (this InstanceKey) String() string + type InstanceKeyMap map[InstanceKey]bool + func NewInstanceKeyMap() *InstanceKeyMap + func (this *InstanceKeyMap) AddKey(key InstanceKey) + func (this *InstanceKeyMap) AddKeys(keys []InstanceKey) + func (this *InstanceKeyMap) GetInstanceKeys() []InstanceKey + func (this *InstanceKeyMap) HasKey(key InstanceKey) bool + func (this *InstanceKeyMap) Len() int + func (this *InstanceKeyMap) MarshalJSON() ([]byte, error) + func (this *InstanceKeyMap) ReadCommaDelimitedList(list string) error + func (this *InstanceKeyMap) ReadJson(jsonString string) error + func (this *InstanceKeyMap) ToCommaDelimitedList() string + func (this *InstanceKeyMap) ToJSON() (string, error) + func (this *InstanceKeyMap) ToJSONString() string + type ReplicationLagResult struct + Err error + Key InstanceKey + Lag time.Duration + func NewNoReplicationLagResult() *ReplicationLagResult + func (this *ReplicationLagResult) HasLag() bool