Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultMaxRetries indicates the max retry count. DefaultMaxRetries = 30 // RetryInterval indicates retry interval. RetryInterval uint64 = 500 )
Variables ¶
This section is empty.
Functions ¶
func RandomBuf ¶
RandomBuf generates a random string using ASCII characters but avoid separator character. See https://github.com/mysql/mysql-server/blob/5.7/mysys_ssl/crypt_genhash_impl.cc#L435
func RunWithRetry ¶
RunWithRetry will run the f with backoff and retry. retryCnt: Max retry count backoff: When run f failed, it will sleep backoff * triedCount time.Millisecond. Function f should have two return value. The first one is an bool which indicate if the err if retryable. The second is if the f meet any error.
Types ¶
type ProcessInfo ¶
type ProcessInfo struct {
ID uint64
User string
Host string
DB string
Command string
Time time.Time
State uint16
Info string
}
ProcessInfo is a struct used for show processlist statement.
type SessionManager ¶
type SessionManager interface {
ShowProcessList() []ProcessInfo
Kill(connectionID uint64, query bool)
}
SessionManager is an interface for session manage. Show processlist and kill statement rely on this interface.
Click to show internal directories.
Click to hide internal directories.