mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-04 21:09:06 +08:00
76bc365181
Signed-off-by: xige-16 <xi.ge@zilliz.com>
33 lines
751 B
Go
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
|
|
}
|