Documentation
¶
Index ¶
Constants ¶
View Source
const ( MYSQL_DB = `CREATE DATABASE IF NOT EXISTS iot_manage` MYSQL_IOT_THING_CREATE = `` /* 975-byte string literal not displayed */ MYSQL_IOT_DEVICE_EVENT_DATA = `` /* 477-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
func NewEventDB ¶
Types ¶
type EventDB ¶
type EventDB struct {
// contains filtered or unexported fields
}
property model
func (*EventDB) BatchCreate ¶
type LoadBalance ¶
type LoadBalanceRandom ¶
type LoadBalanceRandom struct {
// contains filtered or unexported fields
}
func NewLoadBalanceRandom ¶
func NewLoadBalanceRandom(servers []*Server) *LoadBalanceRandom
func (*LoadBalanceRandom) Close ¶
func (l *LoadBalanceRandom) Close()
func (*LoadBalanceRandom) Select ¶
func (l *LoadBalanceRandom) Select(remove []*sqlx.DB) *Server
选择一个后端Server
func (*LoadBalanceRandom) String ¶
func (l *LoadBalanceRandom) String() string
func (*LoadBalanceRandom) UpdateServers ¶
func (l *LoadBalanceRandom) UpdateServers(servers []*Server)
系统运行过程中,后端可用Server会更新
type PropertyDB ¶
type PropertyDB struct {
// contains filtered or unexported fields
}
property model
func (*PropertyDB) BatchCreate ¶
func (p *PropertyDB) BatchCreate(ctx context.Context, sqlCreate string, values interface{}) (err error)
func (*PropertyDB) Close ¶
func (p *PropertyDB) Close() error
Click to show internal directories.
Click to hide internal directories.