package
0.0.1
Repository: https://github.com/golang-tools/kafkahelper.git
Documentation: pkg.go.dev

# Functions

AddHeader 添加一个header@params key string header键@params value []byte header值.
Extract 从消息中提取精简信息.
ExtractValue 从消息中获取headers字典@params msg *kafka.Message 消息指针.
ExtractValue 从消息中获取key@params msg *kafka.Message 消息指针.
ExtractTopic 从消息中获取来源的topic@params msg *kafka.Message 消息指针.
ExtractValue 从消息中获取value@params msg *kafka.Message 消息指针.
NewMsg 构造消息用于发送@params topic string 消息要发送去的topic@params value []byte 消息的值@params opts ...optparams.Option[kafka.Message] 消息的其他设置.
WithHeaders 设置headers@params headers map[string][]byte header键值对.
WithKey 设置key@params key []byte key的值.
WithPartition 设置发送去的Partition@params partition int32 分区号,默认为kafka.PartitionAny,即-1.

# Structs

ConciseMsg 简化版本的消息对象,*kafka.Message信息过全,结构略复杂并不太利于利用.