2020-11-02 16:44:54 +08:00
|
|
|
package flowgraph
|
|
|
|
|
2020-11-09 16:27:11 +08:00
|
|
|
import "github.com/zilliztech/milvus-distributed/internal/msgstream"
|
|
|
|
|
2020-11-02 16:44:54 +08:00
|
|
|
type Msg interface {
|
|
|
|
TimeTick() Timestamp
|
2020-11-02 19:30:12 +08:00
|
|
|
DownStreamNodeIdx() int
|
2020-11-02 16:44:54 +08:00
|
|
|
}
|
2020-11-09 16:27:11 +08:00
|
|
|
|
|
|
|
type MsgStreamMsg struct {
|
|
|
|
tsMessages []*msgstream.TsMsg
|
|
|
|
timestampMin Timestamp
|
|
|
|
timestampMax Timestamp
|
|
|
|
}
|
|
|
|
|
|
|
|
func (msMsg *MsgStreamMsg) TimeTick() Timestamp {
|
|
|
|
return msMsg.timestampMax
|
|
|
|
}
|
|
|
|
|
|
|
|
func (msMsg *MsgStreamMsg) DownStreamNodeIdx() int {
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (msMsg *MsgStreamMsg) TsMessages() *[]*msgstream.TsMsg {
|
|
|
|
return &msMsg.tsMessages
|
|
|
|
}
|
|
|
|
|
|
|
|
func (msMsg *MsgStreamMsg) TimestampMin() Timestamp {
|
|
|
|
return msMsg.timestampMin
|
|
|
|
}
|
|
|
|
|
|
|
|
func (msMsg *MsgStreamMsg) TimestampMax() Timestamp {
|
|
|
|
return msMsg.timestampMax
|
|
|
|
}
|