intimate/store.go

45 lines
690 B
Go
Raw Normal View History

2020-07-07 10:39:24 +00:00
package intimate
import (
"database/sql"
_ "github.com/go-sql-driver/mysql"
)
// OperatorFlag 标志
type OperatorFlag int32
const (
2020-07-09 03:38:51 +00:00
// OperatorOK 等待被处理
OperatorOK OperatorFlag = 100
// OperatorExtractorOK 提取数据完成
OperatorExtractorOK OperatorFlag = 200
// OperatorWait 等待被处理
OperatorWait OperatorFlag = 1000
// OperatorError 错误标志
OperatorError OperatorFlag = 10000
)
type ISet interface {
Set(string, interface{})
}
type IGet interface {
Get(string) interface{}
}
type IGetSet interface {
ISet
IGet
}
2020-07-10 04:05:33 +00:00
// SourceStore 储存
type StoreSource struct {
2020-07-22 12:00:02 +00:00
table string
db *sql.DB
popCount int
2020-07-09 03:38:51 +00:00
errorCount int
errorLimit int
}