Documentation ¶
Index ¶
- func StringToSaramaConsumerMessage(str string) *sarama.ConsumerMessage
- type MockConsumerGroupClaim
- type MockConsumerGroupSession
- func (*MockConsumerGroupSession) Claims() map[string][]int32
- func (*MockConsumerGroupSession) Commit()
- func (*MockConsumerGroupSession) Context() context.Context
- func (*MockConsumerGroupSession) GenerationID() int32
- func (*MockConsumerGroupSession) MarkMessage(msg *sarama.ConsumerMessage, metadata string)
- func (*MockConsumerGroupSession) MarkOffset(topic string, partition int32, offset int64, metadata string)
- func (*MockConsumerGroupSession) MemberID() string
- func (*MockConsumerGroupSession) ResetOffset(topic string, partition int32, offset int64, metadata string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StringToSaramaConsumerMessage ¶
func StringToSaramaConsumerMessage(str string) *sarama.ConsumerMessage
StringToSaramaConsumerMessage converts string to sarama consumer message
Types ¶
type MockConsumerGroupClaim ¶
type MockConsumerGroupClaim struct {
// contains filtered or unexported fields
}
MockConsumerGroupClaim MockConsumerGroupClaim
func NewMockConsumerGroupClaim ¶
func NewMockConsumerGroupClaim(messages []*sarama.ConsumerMessage) *MockConsumerGroupClaim
NewMockConsumerGroupClaim creates MockConsumerGroupClaim with provided messages
func (*MockConsumerGroupClaim) HighWaterMarkOffset ¶
func (cgc *MockConsumerGroupClaim) HighWaterMarkOffset() int64
HighWaterMarkOffset returns the high water mark offset of the partition,
func (*MockConsumerGroupClaim) InitialOffset ¶
func (cgc *MockConsumerGroupClaim) InitialOffset() int64
InitialOffset returns the initial offset that was used as a starting point for this claim.
func (*MockConsumerGroupClaim) Messages ¶
func (cgc *MockConsumerGroupClaim) Messages() <-chan *sarama.ConsumerMessage
Messages returns the read channel for the messages that are returned by
func (*MockConsumerGroupClaim) Partition ¶
func (cgc *MockConsumerGroupClaim) Partition() int32
Partition returns the consumed partition.
func (*MockConsumerGroupClaim) Topic ¶
func (cgc *MockConsumerGroupClaim) Topic() string
Topic returns the consumed topic name.
type MockConsumerGroupSession ¶
type MockConsumerGroupSession struct{}
MockConsumerGroupSession MockConsumerGroupSession
func (*MockConsumerGroupSession) Claims ¶
func (*MockConsumerGroupSession) Claims() map[string][]int32
Claims returns information about the claimed partitions by topic.
func (*MockConsumerGroupSession) Context ¶
func (*MockConsumerGroupSession) Context() context.Context
Context returns the session context.
func (*MockConsumerGroupSession) GenerationID ¶
func (*MockConsumerGroupSession) GenerationID() int32
GenerationID returns the current generation ID.
func (*MockConsumerGroupSession) MarkMessage ¶
func (*MockConsumerGroupSession) MarkMessage(msg *sarama.ConsumerMessage, metadata string)
MarkMessage marks a message as consumed.
func (*MockConsumerGroupSession) MarkOffset ¶
func (*MockConsumerGroupSession) MarkOffset(topic string, partition int32, offset int64, metadata string)
MarkOffset marks the provided offset, alongside a metadata string
func (*MockConsumerGroupSession) MemberID ¶
func (*MockConsumerGroupSession) MemberID() string
MemberID returns the cluster member ID.
func (*MockConsumerGroupSession) ResetOffset ¶
func (*MockConsumerGroupSession) ResetOffset(topic string, partition int32, offset int64, metadata string)
ResetOffset resets to the provided offset, alongside a metadata string that