Documentation
¶
Index ¶
- Constants
- func HTTPGet(url string) (string, error)
- func HTTPPost(url string, payload interface{}) (*http.Response, func(), error)
- func HTTPPut(url string, payload interface{}) (*http.Response, func(), error)
- func HTTPReadBody(resp *http.Response) string
- func TruncateQuery(query string, max int) string
- func WriteFile(file string, data []byte) error
- type DiskStatus
- type LogInfo
- type RotateFile
- type Throttle
Constants ¶
View Source
const ( // UNSUPPORT type. UNSUPPORT = "UNSUPPORT" // DDL type. DDL = "DDL" // USEDB type. USEDB = "USEDB" // SHOW type. SHOW = "SHOW" // SELECT type. SELECT = "SELECT" // INSERT type. INSERT = "INSERT" // UPDATE type. UPDATE = "UPDATE" // DELETE type. DELETE = "DELETE" // REPLACE type. REPLACE = "REPLACE" // EXPLAIN type. EXPLAIN = "EXPLAIN" // HELP type. HELP = "HELP" // KILL type. KILL = "KILL" // SET type. SET = "SET" // TRANSACTION type. TRANSACTION = "TRANSACTION" // CHECKSUM type. CHECKSUM = "CHECKSUM" // DO type. DO = "DO" // OPTIMIZE type. OPTIMIZE = "OPTIMIZE" // CHECK type. CHECK = "CHECK" // RADON type RADON = "RADON" )
Variables ¶
This section is empty.
Functions ¶
func HTTPPost ¶
HTTPPost used to do restful post request.
func HTTPPut ¶
HTTPPut used to do restful put request.
func HTTPReadBody ¶
HTTPReadBody returns the body of the response.
func TruncateQuery ¶
TruncateQuery used to truncate the query with max length.
Types ¶
type DiskStatus ¶
DiskStatus tuple.
func DiskUsage ¶
func DiskUsage(path string) (*DiskStatus, error)
DiskUsage returns the disk info of the path.
type LogInfo ¶
LogInfo tuple.
type RotateFile ¶
type RotateFile interface { Write(b []byte) (int, error) Sync() error Close() Name() string GetOldLogInfos() ([]LogInfo, error) GetNextLogInfo(logName string) (LogInfo, error) GetCurrLogInfo(ts int64) (LogInfo, error) }
RotateFile interface.
Click to show internal directories.
Click to hide internal directories.