Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BrokerGenerator ¶ added in v3.9.0
type BrokerGenerator = func(addr string) SaramaBroker
BrokerGenerator is a function that returns a sarama broker interface
type ConsumerGroupInitialiser ¶
type ConsumerGroupInitialiser = func(addrs []string, groupID string, config *sarama.Config) (sarama.ConsumerGroup, error)
ConsumerGroupInitialiser is a function that returns a sarama consumer group interface
type Message ¶
type Message interface { // GetData returns the message contents. GetData() []byte // GetHeader takes a key for the header and returns the value if the key exist in the header. GetHeader(key string) string // Context returns a context with traceid. Context() context.Context // Mark marks the message as consumed, but doesn't commit the offset to the backend Mark() // Commit marks the message as consumed and commits its offset to the backend Commit() // Release closes the UpstreamDone channel for this message Release() // CommitAndRelease marks a message as consumed, commits it and closes the UpstreamDone channel CommitAndRelease() // Offset returns the message offset Offset() int64 // UpstreamDone returns the upstreamDone channel. Closing this channel notifies that the message has been consumed UpstreamDone() chan struct{} }
Message represents a single kafka message.
type ProducerInitialiser ¶
type ProducerInitialiser = func(addrs []string, config *sarama.Config) (sarama.AsyncProducer, error)
ProducerInitialiser is a function that returns a sarama async producer interface
type SaramaAsyncProducer ¶
type SaramaAsyncProducer = sarama.AsyncProducer
SaramaAsyncProducer is an alias for sarama.AsyncProducer
type SaramaBroker ¶
type SaramaConsumerGroup ¶
type SaramaConsumerGroup = sarama.ConsumerGroup
SaramaConsumerGroup is an alias for sarama.ConsumerGroup
type SaramaConsumerGroupClaim ¶
type SaramaConsumerGroupClaim = sarama.ConsumerGroupClaim
SaramaConsumerGroupClaim is an alias for sarama.ConsumerGroupClaim
type SaramaConsumerGroupSession ¶
type SaramaConsumerGroupSession = sarama.ConsumerGroupSession
SaramaConsumerGroupSession is an alias for sarama.ConsumerGroupSession
Click to show internal directories.
Click to hide internal directories.