adaptor

package
v2.5.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeserializeToMQWrapperID

func DeserializeToMQWrapperID(msgID []byte, walName string) (common.MessageID, error)

DeserializeToMQWrapperID deserializes messageID bytes to common.MessageID TODO: should be removed in future after common.MessageID is removed

func MustGetCommonpbMsgTypeFromMessageType

func MustGetCommonpbMsgTypeFromMessageType(t message.MessageType) commonpb.MsgType

MustGetCommonpbMsgTypeFromMessageType returns the commonpb.MsgType from message.MessageType.

func MustGetMQWrapperIDFromMessage

func MustGetMQWrapperIDFromMessage(messageID message.MessageID) common.MessageID

MustGetMQWrapperIDFromMessage converts message.MessageID to common.MessageID TODO: should be removed in future after common.MessageID is removed

func MustGetMessageIDFromMQWrapperID

func MustGetMessageIDFromMQWrapperID(commonMessageID common.MessageID) message.MessageID

MustGetMessageIDFromMQWrapperID converts common.MessageID to message.MessageID TODO: should be removed in future after common.MessageID is removed

func MustGetMessageIDFromMQWrapperIDBytes

func MustGetMessageIDFromMQWrapperIDBytes(walName string, msgIDBytes []byte) message.MessageID

func NewCreateSegmentMessageBody

func NewCreateSegmentMessageBody(msg message.ImmutableMessage) (msgstream.TsMsg, error)

func NewFlushMessageBody

func NewFlushMessageBody(msg message.ImmutableMessage) (msgstream.TsMsg, error)

func NewManualFlushMessageBody

func NewManualFlushMessageBody(msg message.ImmutableMessage) (msgstream.TsMsg, error)

func NewMsgPackFromMessage

func NewMsgPackFromMessage(msgs ...message.ImmutableMessage) (*msgstream.MsgPack, error)

FromMessageToMsgPack converts message to msgpack. Same TimeTick must be sent with same msgpack. !!! Msgs must be keep same time tick. TODO: remove this function after remove the msgstream implementation.

func NewMsgPackFromMutableMessageV1

func NewMsgPackFromMutableMessageV1(msg message.MutableMessage) (msgstream.TsMsg, error)

Types

type BaseMsgPackAdaptorHandler

type BaseMsgPackAdaptorHandler struct {
	Logger         *log.MLogger
	Channel        chan *msgstream.MsgPack
	Pendings       []message.ImmutableMessage                   // pendings hold the vOld message which has same time tick.
	PendingMsgPack *typeutil.MultipartQueue[*msgstream.MsgPack] // pendingMsgPack hold unsent msgPack.
}

BaseMsgPackAdaptorHandler is the handler for message pack.

func NewBaseMsgPackAdaptorHandler

func NewBaseMsgPackAdaptorHandler() *BaseMsgPackAdaptorHandler

NewBaseMsgPackAdaptorHandler create a new base message pack adaptor handler.

func (*BaseMsgPackAdaptorHandler) GenerateMsgPack

func (m *BaseMsgPackAdaptorHandler) GenerateMsgPack(msg message.ImmutableMessage)

GenerateMsgPack generate msgPack from message.

type CreateSegmentMessageBody

type CreateSegmentMessageBody struct {
	CreateSegmentMessage message.ImmutableCreateSegmentMessageV2
	// contains filtered or unexported fields
}

func (CreateSegmentMessageBody) ID

func (t CreateSegmentMessageBody) ID() msgstream.UniqueID

func (CreateSegmentMessageBody) Marshal

func (t CreateSegmentMessageBody) Marshal(msgstream.TsMsg) (msgstream.MarshalType, error)

func (CreateSegmentMessageBody) SetID

func (t CreateSegmentMessageBody) SetID(id msgstream.UniqueID)

func (CreateSegmentMessageBody) SetTs

func (t CreateSegmentMessageBody) SetTs(ts uint64)

func (CreateSegmentMessageBody) Size

func (t CreateSegmentMessageBody) Size() int

func (CreateSegmentMessageBody) SourceID

func (t CreateSegmentMessageBody) SourceID() int64

func (CreateSegmentMessageBody) Type

func (t CreateSegmentMessageBody) Type() commonpb.MsgType

func (CreateSegmentMessageBody) Unmarshal

func (t CreateSegmentMessageBody) Unmarshal(msgstream.MarshalType) (msgstream.TsMsg, error)

type FlushMessageBody

type FlushMessageBody struct {
	FlushMessage message.ImmutableFlushMessageV2
	// contains filtered or unexported fields
}

func (FlushMessageBody) ID

func (t FlushMessageBody) ID() msgstream.UniqueID

func (FlushMessageBody) Marshal

func (t FlushMessageBody) Marshal(msgstream.TsMsg) (msgstream.MarshalType, error)

func (FlushMessageBody) SetID

func (t FlushMessageBody) SetID(id msgstream.UniqueID)

func (FlushMessageBody) SetTs

func (t FlushMessageBody) SetTs(ts uint64)

func (FlushMessageBody) Size

func (t FlushMessageBody) Size() int

func (FlushMessageBody) SourceID

func (t FlushMessageBody) SourceID() int64

func (FlushMessageBody) Type

func (t FlushMessageBody) Type() commonpb.MsgType

func (FlushMessageBody) Unmarshal

func (t FlushMessageBody) Unmarshal(msgstream.MarshalType) (msgstream.TsMsg, error)

type ManualFlushMessageBody

type ManualFlushMessageBody struct {
	ManualFlushMessage message.ImmutableManualFlushMessageV2
	// contains filtered or unexported fields
}

func (ManualFlushMessageBody) ID

func (t ManualFlushMessageBody) ID() msgstream.UniqueID

func (ManualFlushMessageBody) Marshal

func (t ManualFlushMessageBody) Marshal(msgstream.TsMsg) (msgstream.MarshalType, error)

func (ManualFlushMessageBody) SetID

func (t ManualFlushMessageBody) SetID(id msgstream.UniqueID)

func (ManualFlushMessageBody) SetTs

func (t ManualFlushMessageBody) SetTs(ts uint64)

func (ManualFlushMessageBody) Size

func (t ManualFlushMessageBody) Size() int

func (ManualFlushMessageBody) SourceID

func (t ManualFlushMessageBody) SourceID() int64

func (ManualFlushMessageBody) Type

func (t ManualFlushMessageBody) Type() commonpb.MsgType

func (ManualFlushMessageBody) Unmarshal

func (t ManualFlushMessageBody) Unmarshal(msgstream.MarshalType) (msgstream.TsMsg, error)

type MsgPackAdaptorHandler

type MsgPackAdaptorHandler struct {
	// contains filtered or unexported fields
}

MsgPackAdaptorHandler is the handler for message pack.

func NewMsgPackAdaptorHandler

func NewMsgPackAdaptorHandler() *MsgPackAdaptorHandler

NewMsgPackAdaptorHandler create a new message pack adaptor handler.

func (*MsgPackAdaptorHandler) Chan

func (m *MsgPackAdaptorHandler) Chan() <-chan *msgstream.MsgPack

Chan is the channel for message.

func (*MsgPackAdaptorHandler) Close

func (m *MsgPackAdaptorHandler) Close()

Close is the callback for closing message.

func (*MsgPackAdaptorHandler) Handle

Handle is the callback for handling message.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL