Documentation ¶
Index ¶
- Constants
- func AllNodes(search string, page, rows int) (et.List, error)
- func DefineNodes() error
- func DeleteNodeById(id string) (et.Item, error)
- func GetNodeById(id string) (et.Item, error)
- func InitDefine() error
- func UpSertNode(id string, mode int, driver, host string, port int, ...) (et.Item, error)
- type Master
- func (c *Master) GetNodeByID(id string) *Node
- func (c *Master) GetSyncById(idT string) (et.Item, error)
- func (c *Master) LoadNode(params et.Json) error
- func (c *Master) LoadNodeById(id string) error
- func (c *Master) LoadNodes() error
- func (c *Master) SetSync(schema, table, action, node, idT string, data et.Json, query string) (int, error)
- func (c *Master) UnloadNodeById(id string) error
- type Node
- func (c *Node) DelSyncByIndex(index int) error
- func (c *Node) GetSyncByIdT(idT string) (et.Item, error)
- func (c *Node) InsertValues(data et.Json) (fields, values string)
- func (c *Node) LatIndex() int
- func (n *Node) Scan(data *et.Json) error
- func (c *Node) SqlField(schema, table string, data et.Json) string
- func (c *Node) SyncIdT(idT string) error
- func (c *Node) SyncMasterToNode() error
- func (c *Node) SyncNode() error
- func (c *Node) SyncNodeToMaster() error
- func (c *Node) SyncQuery(query string, index int) error
- func (c *Node) SyncRecord(schema, table, idT string, _data et.Json, action string, _index int) error
- func (c *Node) ToSql(schema, table, idT string, data et.Json, action string) (string, bool)
- func (c *Node) UpsertValues(data et.Json) (fields, values, fieldValue string)
Constants ¶
View Source
const NodeStatusActive = 1
View Source
const NodeStatusError = 4
View Source
const NodeStatusIdle = 0
View Source
const NodeStatusSync = 3
View Source
const NodeStatusWorking = 2
Variables ¶
This section is empty.
Functions ¶
func DefineNodes ¶ added in v0.0.34
func DefineNodes() error
func InitDefine ¶ added in v0.0.88
func InitDefine() error
Types ¶
type Master ¶
* * *
func (*Master) GetNodeByID ¶
func (*Master) LoadNodeById ¶
func (*Master) UnloadNodeById ¶
type Node ¶
type Node struct { Db int URL string Date_make time.Time `json:"date_make"` Date_update time.Time `json:"date_update"` Id string `json:"_id"` Mode int `json:"mode"` Data et.Json `json:"_data"` Status int `json:"status"` Index int `json:"index"` }
func (*Node) DelSyncByIndex ¶ added in v0.0.34
func (*Node) SyncMasterToNode ¶ added in v0.0.34
func (*Node) SyncNodeToMaster ¶ added in v0.0.34
func (*Node) SyncRecord ¶
Click to show internal directories.
Click to hide internal directories.