milvus/internal/msgstream/msgstream.go
xige-16 76bc365181 Add seek function for pulsarTtMsgStream
Signed-off-by: xige-16 <xi.ge@zilliz.com>
2021-01-20 17:34:50 +08:00

33 lines
751 B
Go

package msgstream
import (
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/util/typeutil"
)
type UniqueID = typeutil.UniqueID
type Timestamp = typeutil.Timestamp
type IntPrimaryKey = typeutil.IntPrimaryKey
type MsgPosition = internalpb2.MsgPosition
type MsgPack struct {
BeginTs Timestamp
EndTs Timestamp
Msgs []TsMsg
StartPositions []*MsgPosition
endPositions []*MsgPosition
}
type RepackFunc func(msgs []TsMsg, hashKeys [][]int32) (map[int32]*MsgPack, error)
type MsgStream interface {
Start()
Close()
Produce(*MsgPack) error
Broadcast(*MsgPack) error
Consume() *MsgPack
Chan() <-chan *MsgPack
Seek(offset *MsgPosition) error
}