Documentation ¶
Index ¶
- Constants
- Variables
- func AbsInt(x int) int
- func CloseMysqlConnection(db *sql.DB) error
- func ConfigToStruct(source core.StringMap, target interface{}) error
- func CreateMysqlConnection(host string, port uint16, user string, password string) (db1 *sql.DB, err error)
- func FullTableName(db string, table string) string
- func GenerateRandomServerID() uint32
- func GenerateSqlAndArgs(event *core.DBChangeEvent, keyColumns []string) (sqlString string, sqlArgs []interface{})
- func GetArrayFromConfig(config core.StringMap, path string) ([]interface{}, error)
- func GetConfigArrayFromConfig(config core.StringMap, path string) ([]core.StringMap, error)
- func GetConfigFromConfig(config core.StringMap, path string) (core.StringMap, error)
- func GetFNV64aHash(text string) int
- func GetIntFromConfig(config core.StringMap, path string) (int, error)
- func GetStringFromConfig(config core.StringMap, path string) (string, error)
- func GetTypeName(v interface{}) string
- func IntervalCheckTicker(intervalMS int64) *time.Ticker
- func IsMultipleStatements(sqlString string) bool
- func IsNil(v interface{}) bool
- func LoadColumnTypes(db string, table string, cols []string, conn *sql.DB) ([]*sql.ColumnType, error)
- func LookupDNS(host string) ([]string, error)
- func NewBatchDataPointers(columnTypes []*sql.ColumnType, size int) [][]interface{}
- func ReadDataFromPointers(pointers []interface{}) []interface{}
- func ScanRowsWithDataPointers(rows *sql.Rows, columnTypes []*sql.ColumnType, vPtrs []interface{}) ([]interface{}, error)
- func ScanType(columnType *sql.ColumnType) reflect.Type
- func SignalQuit() chan os.Signal
- type DDLInfo
Constants ¶
View Source
const ( DefaultMysqlConnectionTimeout = 10000 // milliseconds DefaultMysqlReadTimeout = 30000 DefaultMysqlWriteTimeout = 30000 )
View Source
const DefaultCheckProgressInterval = time.Second * 30
Variables ¶
View Source
var SaramaVersion = sarama.V3_3_1_0
Functions ¶
func CloseMysqlConnection ¶
CloseMysqlConnection closes mysql client connection
func ConfigToStruct ¶
ConfigToStruct converts a map to corresponding struct.
func CreateMysqlConnection ¶
func CreateMysqlConnection(host string, port uint16, user string, password string) (db1 *sql.DB, err error)
CreateMysqlConnection creates a new instance of mysql connection
func FullTableName ¶
func GenerateRandomServerID ¶
func GenerateRandomServerID() uint32
func GenerateSqlAndArgs ¶
func GenerateSqlAndArgs(event *core.DBChangeEvent, keyColumns []string) (sqlString string, sqlArgs []interface{})
func GetArrayFromConfig ¶
func GetConfigFromConfig ¶
func GetFNV64aHash ¶
func GetStringFromConfig ¶
func IntervalCheckTicker ¶
IntervalCheckTicker ensure things happen in intervalMS period so use a much smaller check interval than intervalMS to prevent the extreme near 2*intervalMS situation.
func IsMultipleStatements ¶
func IsNil ¶
func IsNil(v interface{}) bool
IsNil works around the famous issue https://stackoverflow.com/questions/13476349/check-for-nil-and-nil-interface-in-go
func LoadColumnTypes ¶
func NewBatchDataPointers ¶
func NewBatchDataPointers(columnTypes []*sql.ColumnType, size int) [][]interface{}
func ReadDataFromPointers ¶
func ReadDataFromPointers(pointers []interface{}) []interface{}
func ScanRowsWithDataPointers ¶
func ScanRowsWithDataPointers(rows *sql.Rows, columnTypes []*sql.ColumnType, vPtrs []interface{}) ([]interface{}, error)
func SignalQuit ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.