mysql

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BinlogMagicOffset     = 4
	TimestampHeaderLength = 4
)
View Source
const (
	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 BinlogCacheFileName = ".walg_mysql_binlogs_cache"

Variables

This section is empty.

Functions

func FetchLogs added in v0.2.12

func FetchLogs(folder storage.Folder, backup *internal.Backup) error

func HandleBinlogPush

func HandleBinlogPush(uploader *Uploader)

func HandleStreamPush

func HandleStreamPush(uploader *Uploader, command []string)

Types

type BinlogFetchHandlers added in v0.2.12

type BinlogFetchHandlers struct {
	// contains filtered or unexported fields
}

func (BinlogFetchHandlers) DownloadLogTo added in v0.2.12

func (handlers BinlogFetchHandlers) DownloadLogTo(logFolder storage.Folder, logName string, dstLogFilePath string) error

func (BinlogFetchHandlers) GetLogFilePath added in v0.2.12

func (handlers BinlogFetchHandlers) GetLogFilePath(pathToLog string) (string, error)

func (BinlogFetchHandlers) HandleAbortFetch added in v0.2.12

func (handlers BinlogFetchHandlers) HandleAbortFetch(logFilePath string) error

func (BinlogFetchHandlers) ShouldBeAborted added in v0.2.12

func (handlers BinlogFetchHandlers) ShouldBeAborted(pathToLog string) (bool, error)

type BinlogFetchSettings added in v0.2.12

type BinlogFetchSettings struct{}

func (BinlogFetchSettings) GetDstEnv added in v0.2.12

func (settings BinlogFetchSettings) GetDstEnv() string

func (BinlogFetchSettings) GetEndTsEnv added in v0.2.12

func (settings BinlogFetchSettings) GetEndTsEnv() string

func (BinlogFetchSettings) GetLogFolderPath added in v0.2.12

func (settings BinlogFetchSettings) GetLogFolderPath() string

type LogsCache added in v0.2.12

type LogsCache 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