Documentation ¶
Index ¶
Constants ¶
View Source
const ( OutputTypeMySQL = "mysql" OutputTypeCSV = "csv" OutputTypeStdout = "stdout" )
Variables ¶
View Source
var InvalidTaskStatus = errors.New("invalid task status")
Functions ¶
func GetSQLErrCode ¶
GetSQLErrCode returns error code if err is a mysql error
Types ¶
type MTS ¶
type MTS struct { ID uint64 Status TaskStatus }
type MySQLConf ¶
type MySQLConf struct { Host string Port int User string Password string DBName string MaxIdleConns int MaxOpenConns int MaxLifetime time.Duration }
MySQLConf is the mysql conf
type TaskStatus ¶
type TaskStatus uint8
TaskStatus the task status type define
const ( TaskStatusUnknown TaskStatus = iota TaskStatusRunning TaskStatusPaused TaskStatusStopped TaskStatusUnexceptedExited TaskStatusCompleted TaskStatusRunningTimeout )
func ParseTaskStatusFromString ¶
func ParseTaskStatusFromString(s string) (TaskStatus, error)
func (TaskStatus) MarshalJSON ¶
func (ts TaskStatus) MarshalJSON() ([]byte, error)
func (TaskStatus) String ¶
func (ts TaskStatus) String() string
func (*TaskStatus) UnmarshalJSON ¶
func (ts *TaskStatus) UnmarshalJSON(data []byte) (err error)
Click to show internal directories.
Click to hide internal directories.