godchen bade037fb2 Add meta_table implementation
Signed-off-by: godchen <qingxiang.chen@zilliz.com>
2020-11-04 16:01:28 +08:00

44 lines
789 B
Go

package proxy
import (
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
"github.com/zilliztech/milvus-distributed/internal/util/typeutil"
)
//type TimeStamp uint64
type task interface {
Id() int64 // return ReqId
Type() internalpb.ReqType
GetTs() typeutil.Timestamp
SetTs(ts typeutil.Timestamp)
PreExecute() error
Execute() error
PostExecute() error
WaitToFinish() error
Notify() error
}
type baseTask struct {
ReqType internalpb.ReqType
ReqId int64
Ts typeutil.Timestamp
ProxyId int64
}
func (bt *baseTask) Id() int64 {
return bt.ReqId
}
func (bt *baseTask) Type() internalpb.ReqType {
return bt.ReqType
}
func (bt *baseTask) GetTs() typeutil.Timestamp {
return bt.Ts
}
func (bt *baseTask) SetTs(ts typeutil.Timestamp) {
bt.Ts = ts
}