mysql

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StreamPrefix          = "stream_"
	BinlogPath            = "binlog_" + utility.VersionStr + "/"
	DatasourceNameSetting = "WALG_MYSQL_DATASOURCE_NAME"
	BinlogEndTsSetting    = "WALG_MYSQL_BINLOG_END_TS"
	BinlogDstSetting      = "WALG_MYSQL_BINLOG_DST"
	BinlogSrcSetting      = "WALG_MYSQL_BINLOG_SRC"
	SslCaSetting          = "WALG_MYSQL_SSL_CA"
)
View Source
const MysqlBinlogCacheFileName = ".walg_mysql_binlogs_cache"

Variables

This section is empty.

Functions

func BinlogShouldBeFetched

func BinlogShouldBeFetched(backupStartUploadTime time.Time, endTS *time.Time, object storage.Object) bool

func ExtractBinlogName

func ExtractBinlogName(object storage.Object, folder storage.Folder) string

func GetBinlogConfigs

func GetBinlogConfigs() (endTS *time.Time, dstFolder string, err error)

func HandleBinlogPush

func HandleBinlogPush(uploader *Uploader)

func HandleStreamFetch

func HandleStreamFetch(backupName string, folder storage.Folder)

func HandleStreamPush

func HandleStreamPush(uploader *Uploader)

Types

type Backup

type Backup struct {
	*internal.Backup
}

func (*Backup) FetchStreamSentinel

func (backup *Backup) FetchStreamSentinel() (StreamSentinelDto, error)

TODO : unit tests

type MySQLLogsCache

type MySQLLogsCache struct {
	LastArchivedBinlog string `json:"LastArchivedBinlog"`
}

type StreamSentinelDto

type StreamSentinelDto struct {
	BinLogStart    string `json:"BinLogStart,omitempty"`
	BinLogEnd      string `json:"BinLogEnd,omitempty"`
	StartLocalTime time.Time
}

type Uploader

type Uploader struct {
	*internal.Uploader
}

func (*Uploader) UploadStream

func (uploader *Uploader) UploadStream(db *sql.DB, stream io.Reader) error

TODO : unit tests UploadFile compresses a file and uploads it.

Jump to

Keyboard shortcuts

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