Documentation ¶
Index ¶
Constants ¶
View Source
const ( TiDBInited TiDBStatus = "Inited" TiDBRunning = "Running" TiDBStoped = "Stoped" TiDBUpgrading = "Upgrading" TiDBWaitingUpgrade = "WaitingUpgrade" )
Variables ¶
This section is empty.
Functions ¶
func CreateTiDBCluster ¶
func CreateTiDBCluster(tc *TiDBCluster) error
func GetTiDBCluster ¶
func GetTiDBCluster(tc *TiDBCluster) (bool, error)
func UpdateTiDBCluster ¶
func UpdateTiDBCluster(tc *TiDBCluster) error
Types ¶
type Engine ¶
type Engine interface { Table(tableNameOrBean interface{}) *xorm.Session Count(...interface{}) (int64, error) Decr(column string, arg ...interface{}) *xorm.Session Delete(interface{}) (int64, error) Exec(...interface{}) (sql.Result, error) Find(interface{}, ...interface{}) error Get(interface{}) (bool, error) ID(interface{}) *xorm.Session In(string, ...interface{}) *xorm.Session Incr(column string, arg ...interface{}) *xorm.Session Insert(...interface{}) (int64, error) InsertOne(interface{}) (int64, error) Iterate(interface{}, xorm.IterFunc) error Join(joinOperator string, tablename interface{}, condition string, args ...interface{}) *xorm.Session SQL(interface{}, ...interface{}) *xorm.Session Where(interface{}, ...interface{}) *xorm.Session Asc(colNames ...string) *xorm.Session }
Engine represents a xorm engine or session.
type TiDBCluster ¶
type TiDBCluster struct { ID int64 `json:"id" xorm:"pk autoincr"` Name string `json:"name" xorm:"VARCHAR(200) UNIQUE NOT NULL"` Version string `json:"version" xorm:"VARCHAR(200)"` Path string `json:"path" xorm:"VARCHAR(200)"` Host string `json:"host" xorm:"VARCHAR(200)"` Status string `json:"status" xorm:"VARCHAR(200)"` Description string `json:"description" xorm:"VARCHAR(512)"` InitTime time.Time `json:"init_time" xorm:"init_time"` }
func GetTiDBClusterByHost ¶
func GetTiDBClusterByHost(host string) ([]*TiDBCluster, error)
func GetTiDBClusterByName ¶
func GetTiDBClusterByName(name string) (*TiDBCluster, error)
func LoadTiDBClusters ¶
func LoadTiDBClusters() ([]*TiDBCluster, error)
func SearchTiDBClusters ¶
func SearchTiDBClusters(s map[string]interface{}) ([]*TiDBCluster, error)
type TiDBStatus ¶
type TiDBStatus string
func JudgeTiDBStatusType ¶
func JudgeTiDBStatusType(this string) (TiDBStatus, error)
Click to show internal directories.
Click to hide internal directories.