Documentation ¶
Index ¶
Constants ¶
View Source
const ( // CtxKafka represents the kafka context type CtxKafka = Key("kafka") )
Variables ¶
View Source
var ( HeaderID = "x-id" HeaderAction = "x-action" HeaderStatusCode = "x-status-code" HeaderVersion = "x-version" HeaderParentID = "x-parent-id" HeaderParentTimestamp = "x-parent-timestamp" )
Kafka message headers
Functions ¶
func MessageFromMessage ¶
func MessageFromMessage(consumed *sarama.ConsumerMessage) *commander.Message
MessageFromMessage attempts to construct a commander message of the given sarama consumer message
func MessageToMessage ¶
func MessageToMessage(produce *commander.Message) *sarama.ProducerMessage
MessageToMessage attempts to construct a sarama consumer message of the given commander message.
Types ¶
Click to show internal directories.
Click to hide internal directories.