mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-07 09:38:39 +08:00
Fix bug and update doc
Signed-off-by: zhenshan.cao <zhenshan.cao@zilliz.com>
This commit is contained in:
parent
eb64839aef
commit
848e375c0d
@ -442,17 +442,17 @@ type TsMsg interface {
|
|||||||
Ts() Timestamp
|
Ts() Timestamp
|
||||||
}
|
}
|
||||||
|
|
||||||
type TsMsgMarshaler interface {
|
|
||||||
Marshal(input *TsMsg) ([]byte, Status)
|
|
||||||
Unmarshal(input []byte) (*TsMsg, Status)
|
|
||||||
}
|
|
||||||
|
|
||||||
type MsgPack struct {
|
type MsgPack struct {
|
||||||
BeginTs Timestamp
|
BeginTs Timestamp
|
||||||
EndTs Timestamp
|
EndTs Timestamp
|
||||||
Msgs []*TsMsg
|
Msgs []*TsMsg
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type TsMsgMarshaler interface {
|
||||||
|
Marshal(input *TsMsg) ([]byte, Status)
|
||||||
|
Unmarshal(input []byte) (*TsMsg, Status)
|
||||||
|
}
|
||||||
|
|
||||||
type MsgStream interface {
|
type MsgStream interface {
|
||||||
SetMsgMarshaler(marshal *TsMsgMarshaler, unmarshal *TsMsgMarshaler)
|
SetMsgMarshaler(marshal *TsMsgMarshaler, unmarshal *TsMsgMarshaler)
|
||||||
Produce(*MsgPack) Status
|
Produce(*MsgPack) Status
|
||||||
@ -461,14 +461,17 @@ type MsgStream interface {
|
|||||||
|
|
||||||
type PulsarMsgStream struct {
|
type PulsarMsgStream struct {
|
||||||
client *pulsar.Client
|
client *pulsar.Client
|
||||||
produceChannels []string
|
msgHashFunc (*MsgPack) map[int32]*MsgPack // return a map from produceChannel idx to *MsgPack
|
||||||
consumeChannels []string
|
producers []*pulsar.Producer
|
||||||
|
consumers []*pulsar.Consumer
|
||||||
msgMarshaler *TsMsgMarshaler
|
msgMarshaler *TsMsgMarshaler
|
||||||
msgUnmarshaler *TsMsgMarshaler
|
msgUnmarshaler *TsMsgMarshaler
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ms *PulsarMsgStream) SetProducerChannels(channels []string)
|
||||||
|
func (ms *PulsarMsgStream) SetConsumerChannels(channels []string)
|
||||||
func (ms *PulsarMsgStream) SetMsgMarshaler(marshal *TsMsgMarshaler, unmarshal *TsMsgMarshaler)
|
func (ms *PulsarMsgStream) SetMsgMarshaler(marshal *TsMsgMarshaler, unmarshal *TsMsgMarshaler)
|
||||||
|
func (ms *PulsarMsgStream) SetMsgHashFunc(XXX)
|
||||||
func (ms *PulsarMsgStream) Produce(*MsgPack) Status
|
func (ms *PulsarMsgStream) Produce(*MsgPack) Status
|
||||||
func (ms *PulsarMsgStream) Consume() *MsgPack //return messages in one time tick
|
func (ms *PulsarMsgStream) Consume() *MsgPack //return messages in one time tick
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user