mirror of https://github.com/milvus-io/milvus.git
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
|
|
}
|