Documentation ¶
Index ¶
- func TransferMessageSystemProperties(message *primitive.Message)
- type RocketMQMessageReader
- func (r *RocketMQMessageReader) GetAttribute(k spec.Kind) (spec.Attribute, interface{})
- func (r *RocketMQMessageReader) GetExtension(s string) interface{}
- func (r *RocketMQMessageReader) ReadBinary(ctx context.Context, encoder binding.BinaryWriter) (err error)
- func (r *RocketMQMessageReader) ReadEncoding() binding.Encoding
- func (r *RocketMQMessageReader) ReadStructured(context.Context, binding.StructuredWriter) error
- func (r *RocketMQMessageReader) ToCloudEvent(ctx context.Context) (*ce.Event, error)
- type RocketMQMessageWriter
- func (r *RocketMQMessageWriter) End(ctx context.Context) error
- func (r *RocketMQMessageWriter) SetAttribute(attribute spec.Attribute, value interface{}) error
- func (r *RocketMQMessageWriter) SetData(data io.Reader) error
- func (r *RocketMQMessageWriter) SetExtension(name string, value interface{}) error
- func (r *RocketMQMessageWriter) Start(ctx context.Context) error
- func (r *RocketMQMessageWriter) ToMessage(ctx context.Context, cloudEvent *ce.Event) (*primitive.Message, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TransferMessageSystemProperties ¶
TransferMessageSystemProperties re-set message system properties to fix pattern
Types ¶
type RocketMQMessageReader ¶
type RocketMQMessageReader struct {
// contains filtered or unexported fields
}
RocketMQMessageReader cloud event message reader
func NewRocketMQMessageReader ¶
func NewRocketMQMessageReader(message *primitive.Message) *RocketMQMessageReader
NewRocketMQMessageReader get RocketMQ message reader
func (*RocketMQMessageReader) GetAttribute ¶
func (r *RocketMQMessageReader) GetAttribute(k spec.Kind) (spec.Attribute, interface{})
GetAttribute get attribute
func (*RocketMQMessageReader) GetExtension ¶
func (r *RocketMQMessageReader) GetExtension(s string) interface{}
GetExtension get extension
func (*RocketMQMessageReader) ReadBinary ¶
func (r *RocketMQMessageReader) ReadBinary(ctx context.Context, encoder binding.BinaryWriter) (err error)
ReadBinary read message and write through encoder
func (*RocketMQMessageReader) ReadEncoding ¶
func (r *RocketMQMessageReader) ReadEncoding() binding.Encoding
ReadEncoding the RocketMQMessageReader only supports binary encoding
func (*RocketMQMessageReader) ReadStructured ¶
func (r *RocketMQMessageReader) ReadStructured(context.Context, binding.StructuredWriter) error
ReadStructured the RocketMQMessageReader only supports binary encoding
func (*RocketMQMessageReader) ToCloudEvent ¶
ToCloudEvent convert RocketMQ message to cloud event
type RocketMQMessageWriter ¶
type RocketMQMessageWriter struct {
// contains filtered or unexported fields
}
RocketMQMessageWriter cloud event message writer
func NewRocketMQMessageWriter ¶
func NewRocketMQMessageWriter(topic string) *RocketMQMessageWriter
NewRocketMQMessageWriter get RocketMQ message writer
func (*RocketMQMessageWriter) End ¶
func (r *RocketMQMessageWriter) End(ctx context.Context) error
End the end of writing, do nothing
func (*RocketMQMessageWriter) SetAttribute ¶
func (r *RocketMQMessageWriter) SetAttribute(attribute spec.Attribute, value interface{}) error
SetAttribute set attribute
func (*RocketMQMessageWriter) SetData ¶
func (r *RocketMQMessageWriter) SetData(data io.Reader) error
SetData set data from reader
func (*RocketMQMessageWriter) SetExtension ¶
func (r *RocketMQMessageWriter) SetExtension(name string, value interface{}) error
SetExtension set extension