You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
469 B
31 lines
469 B
package model
|
|
|
|
import "sync"
|
|
|
|
var RowRequestPool = sync.Pool{
|
|
New: func() interface{} {
|
|
return new(RowRequest)
|
|
},
|
|
}
|
|
|
|
type RowRequest struct {
|
|
RuleKey string
|
|
Action string
|
|
Timestamp uint32
|
|
Old []interface{}
|
|
Row []interface{}
|
|
}
|
|
|
|
type PosRequest struct {
|
|
Name string
|
|
Pos uint32
|
|
Force bool
|
|
}
|
|
|
|
func BuildRowRequest() *RowRequest {
|
|
return RowRequestPool.Get().(*RowRequest)
|
|
}
|
|
|
|
func ReleaseRowRequest(t *RowRequest) {
|
|
RowRequestPool.Put(t)
|
|
}
|
|
|