package
8.2.0+incompatible
Repository: https://github.com/pingcap/tiflow.git
Documentation: pkg.go.dev

# Functions

AddSuffixForUUID adds a suffix for UUID, returns the name for relay log subdirectory.
AdjustBinaryProtocolForDatum converts the data in binlog to TiDB datum.
CollectDirFiles gets files in path.
CompareShardingDDLs compares s and t ddls only concern in content, ignore order of ddl.
ConstructFilename constructs a binlog filename from the basename and seq.
ConstructFilenameWithUUIDSuffix constructs a binlog filename with UUID suffix.
DecodeBinlogPosition parses a mysql.Position from string format.
Decrypt tries to decrypt base64 encoded ciphertext to plaintext.
DecryptOrPlaintext tries to decrypt base64 encoded ciphertext to plaintext or return plaintext.
Encrypt tries to encrypt plaintext to base64 encoded ciphertext.
EncryptOrPlaintext tries to encrypt plaintext to base64 encoded ciphertext or return plaintext.
ExtractDBAndTableFromLockID extract schema and table from lockID.
ExtractRealName removes relay log uuid suffix if it exists and returns real binlog name.
ExtractTaskFromLockID extract task from lockID.
GenDDLLockID returns lock ID used in shard-DDL.
GenFakeRotateEvent generates a fake ROTATE_EVENT without checksum ref: https://github.com/mysql/mysql-server/blob/4f1d7cf5fcb11a3f84cff27e37100d7295e7d5ca/sql/rpl_binlog_sender.cc#L855.
GenHashKey generates key with crc32 algorithm.
GenSchemaID generates schema ID.
GenTableID generates table ID.
GenTableIDAndCheckSchemaOnly generates table ID and check if schema only.
GetDBFromDumpFilename extracts db name from dump filename.
GetFilenameIndex returns a int64 index value (seq number) of the filename.
GetFileSize return the size of the file.
GetStorageSize gets storage's capacity and available size.
GetTableFromDumpFilename extracts db and table name from dump filename.
GetUUIDBySuffix gets relay log subdirectory name by matching suffix.
GoLogWrapper go routine wrapper, log error on panic.
IgnoreErrorCheckpoint is used in checkpoint update.
IsBuildInSkipDDL return true when checked sql that will be skipped for syncer.
IsContextCanceledError checks whether err is context.Canceled.
IsDirExists checks if dir exists.
IsFakeRotateEvent return true if is this event is a fake rotate event If log pos equals zero then the received event is a fake rotate event and contains only a name of the next binlog file See https://github.com/mysql/mysql-server/blob/8e797a5d6eb3a87f16498edcb7261a75897babae/sql/rpl_binlog_sender.h#L235 and https://github.com/mysql/mysql-server/blob/8cc757da3d87bf4a1f07dcfb2d3c96fed3806870/sql/rpl_binlog_sender.cc#L899.
IsFileExists checks if file exists.
LogHTTPProxies logs HTTP proxy relative environment variables.
NewSessionCtx return a session context with specified session variables.
No description provided by the author
NonRepeatStringsEqual is used to compare two un-ordered, non-repeat-element string slice is equal.
ParseFilename parses a string representation binlog filename into a `Filename`.
ParseFileSize parses the size in MiB from input.
ParseRelaySubDir parses relay log subdirectory name to (server UUID, RelaySubDirSuffix) pair.
ParseStartTime parses start-time of task-start and validation-start in local location.
ParseStartTimeInLoc parses start-time of task-start and validation-start.
ParseTimeZone parse the time zone location by name or offset NOTE: we don't support the "SYSTEM" or "Local" time_zone.
ParseUUIDIndex parses UUIDIndexFilename, return a list of relay log subdirectory names and error.
SetToSlice converts a map of struct{} value to a slice to pretty print.
SplitFilenameWithUUIDSuffix analyzes a binlog filename with UUID suffix.
SuffixIntToStr convert int-represented suffix to string-represented.
TrimCtrlChars returns a slice of the string s with all leading and trailing control characters removed.
TrimQuoteMark tries to trim leading and tailing quote(") mark if exists only trim if leading and tailing quote matched as a pair.
TruncateInterface converts the interface to a string and returns a string with only the leading (at most) n runes of the input string.
TruncateString returns a string with only the leading (at most) n runes of the input string.
TruncateStringQuiet returns a string with only the leading (at most) n runes of the input string.
UnpackTableID unpacks table ID to <schema, table> pair.
UnwrapScheme removes http or https scheme from input.
VerifyFilename verifies whether is a valid MySQL/MariaDB binlog filename.
WaitSomething waits for something done with `true`.
WrapSchemes adds http or https scheme to input if missing.
WrapSchemesForInitialCluster acts like WrapSchemes, except input is "name=URL,...".
WriteFileAtomic writes file to temp and atomically move when everything else succeeds.

# Constants

PosRelaySubDirSuffixSeparator is used to differ binlog position from multiple (switched) masters, we added a suffix which comes from relay log subdirectory into binlogPos.Name.
No description provided by the author
No description provided by the author

# Variables

not support to config yet.
OsExit is function placeholder for os.Exit.
not support to config yet.
ZeroSessionCtx is used when the session variables is not important.

# Structs

Filename represents a binlog filename.
StorageSize represents the storage's capacity and available size Learn from tidb-binlog source code.