Documentation ¶
Index ¶
- type Client
- func (_m *Client) Broker(brokerID int32) (*sarama.Broker, error)
- func (_m *Client) Brokers() []*sarama.Broker
- func (_m *Client) Close() error
- func (_m *Client) Closed() bool
- func (_m *Client) Config() *sarama.Config
- func (_m *Client) Controller() (*sarama.Broker, error)
- func (_m *Client) Coordinator(consumerGroup string) (*sarama.Broker, error)
- func (_m *Client) GetOffset(topic string, partitionID int32, time int64) (int64, error)
- func (_m *Client) InSyncReplicas(topic string, partitionID int32) ([]int32, error)
- func (_m *Client) InitProducerID() (*sarama.InitProducerIDResponse, error)
- func (_m *Client) Leader(topic string, partitionID int32) (*sarama.Broker, error)
- func (_m *Client) LeaderAndEpoch(topic string, partitionID int32) (*sarama.Broker, int32, error)
- func (_m *Client) LeastLoadedBroker() *sarama.Broker
- func (_m *Client) OfflineReplicas(topic string, partitionID int32) ([]int32, error)
- func (_m *Client) Partitions(topic string) ([]int32, error)
- func (_m *Client) RefreshBrokers(addrs []string) error
- func (_m *Client) RefreshController() (*sarama.Broker, error)
- func (_m *Client) RefreshCoordinator(consumerGroup string) error
- func (_m *Client) RefreshMetadata(topics ...string) error
- func (_m *Client) RefreshTransactionCoordinator(transactionID string) error
- func (_m *Client) Replicas(topic string, partitionID int32) ([]int32, error)
- func (_m *Client) Topics() ([]string, error)
- func (_m *Client) TransactionCoordinator(transactionID string) (*sarama.Broker, error)
- func (_m *Client) WritablePartitions(topic string) ([]int32, error)
- type ConsumerGroup
- func (_m *ConsumerGroup) Close() error
- func (_m *ConsumerGroup) Consume(ctx context.Context, topics []string, handler sarama.ConsumerGroupHandler) error
- func (_m *ConsumerGroup) Errors() <-chan error
- func (_m *ConsumerGroup) Pause(partitions map[string][]int32)
- func (_m *ConsumerGroup) PauseAll()
- func (_m *ConsumerGroup) Resume(partitions map[string][]int32)
- func (_m *ConsumerGroup) ResumeAll()
- type ConsumerGroupClaim
- type ConsumerGroupSession
- func (_m *ConsumerGroupSession) Claims() map[string][]int32
- func (_m *ConsumerGroupSession) Commit()
- func (_m *ConsumerGroupSession) Context() context.Context
- func (_m *ConsumerGroupSession) GenerationID() int32
- func (_m *ConsumerGroupSession) MarkMessage(msg *sarama.ConsumerMessage, metadata string)
- func (_m *ConsumerGroupSession) MarkOffset(topic string, partition int32, offset int64, metadata string)
- func (_m *ConsumerGroupSession) MemberID() string
- func (_m *ConsumerGroupSession) ResetOffset(topic string, partition int32, offset int64, metadata string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is an autogenerated mock type for the Client type
func NewClient ¶
NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*Client) Controller ¶
Controller provides a mock function with given fields:
func (*Client) Coordinator ¶
Coordinator provides a mock function with given fields: consumerGroup
func (*Client) GetOffset ¶
GetOffset provides a mock function with given fields: topic, partitionID, time
func (*Client) InSyncReplicas ¶
InSyncReplicas provides a mock function with given fields: topic, partitionID
func (*Client) InitProducerID ¶
func (_m *Client) InitProducerID() (*sarama.InitProducerIDResponse, error)
InitProducerID provides a mock function with given fields:
func (*Client) LeaderAndEpoch ¶
LeaderAndEpoch provides a mock function with given fields: topic, partitionID
func (*Client) LeastLoadedBroker ¶
LeastLoadedBroker provides a mock function with given fields:
func (*Client) OfflineReplicas ¶
OfflineReplicas provides a mock function with given fields: topic, partitionID
func (*Client) Partitions ¶
Partitions provides a mock function with given fields: topic
func (*Client) RefreshBrokers ¶
RefreshBrokers provides a mock function with given fields: addrs
func (*Client) RefreshController ¶
RefreshController provides a mock function with given fields:
func (*Client) RefreshCoordinator ¶
RefreshCoordinator provides a mock function with given fields: consumerGroup
func (*Client) RefreshMetadata ¶
RefreshMetadata provides a mock function with given fields: topics
func (*Client) RefreshTransactionCoordinator ¶
RefreshTransactionCoordinator provides a mock function with given fields: transactionID
func (*Client) TransactionCoordinator ¶
TransactionCoordinator provides a mock function with given fields: transactionID
type ConsumerGroup ¶
ConsumerGroup is an autogenerated mock type for the ConsumerGroup type
func NewConsumerGroup ¶
func NewConsumerGroup(t interface { mock.TestingT Cleanup(func()) }) *ConsumerGroup
NewConsumerGroup creates a new instance of ConsumerGroup. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*ConsumerGroup) Close ¶
func (_m *ConsumerGroup) Close() error
Close provides a mock function with given fields:
func (*ConsumerGroup) Consume ¶
func (_m *ConsumerGroup) Consume(ctx context.Context, topics []string, handler sarama.ConsumerGroupHandler) error
Consume provides a mock function with given fields: ctx, topics, handler
func (*ConsumerGroup) Errors ¶
func (_m *ConsumerGroup) Errors() <-chan error
Errors provides a mock function with given fields:
func (*ConsumerGroup) Pause ¶
func (_m *ConsumerGroup) Pause(partitions map[string][]int32)
Pause provides a mock function with given fields: partitions
func (*ConsumerGroup) PauseAll ¶
func (_m *ConsumerGroup) PauseAll()
PauseAll provides a mock function with given fields:
func (*ConsumerGroup) Resume ¶
func (_m *ConsumerGroup) Resume(partitions map[string][]int32)
Resume provides a mock function with given fields: partitions
func (*ConsumerGroup) ResumeAll ¶
func (_m *ConsumerGroup) ResumeAll()
ResumeAll provides a mock function with given fields:
type ConsumerGroupClaim ¶
ConsumerGroupClaim is an autogenerated mock type for the ConsumerGroupClaim type
func NewConsumerGroupClaim ¶
func NewConsumerGroupClaim(t interface { mock.TestingT Cleanup(func()) }) *ConsumerGroupClaim
NewConsumerGroupClaim creates a new instance of ConsumerGroupClaim. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*ConsumerGroupClaim) HighWaterMarkOffset ¶
func (_m *ConsumerGroupClaim) HighWaterMarkOffset() int64
HighWaterMarkOffset provides a mock function with given fields:
func (*ConsumerGroupClaim) InitialOffset ¶
func (_m *ConsumerGroupClaim) InitialOffset() int64
InitialOffset provides a mock function with given fields:
func (*ConsumerGroupClaim) Messages ¶
func (_m *ConsumerGroupClaim) Messages() <-chan *sarama.ConsumerMessage
Messages provides a mock function with given fields:
func (*ConsumerGroupClaim) Partition ¶
func (_m *ConsumerGroupClaim) Partition() int32
Partition provides a mock function with given fields:
func (*ConsumerGroupClaim) Topic ¶
func (_m *ConsumerGroupClaim) Topic() string
Topic provides a mock function with given fields:
type ConsumerGroupSession ¶
ConsumerGroupSession is an autogenerated mock type for the ConsumerGroupSession type
func NewConsumerGroupSession ¶
func NewConsumerGroupSession(t interface { mock.TestingT Cleanup(func()) }) *ConsumerGroupSession
NewConsumerGroupSession creates a new instance of ConsumerGroupSession. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*ConsumerGroupSession) Claims ¶
func (_m *ConsumerGroupSession) Claims() map[string][]int32
Claims provides a mock function with given fields:
func (*ConsumerGroupSession) Commit ¶
func (_m *ConsumerGroupSession) Commit()
Commit provides a mock function with given fields:
func (*ConsumerGroupSession) Context ¶
func (_m *ConsumerGroupSession) Context() context.Context
Context provides a mock function with given fields:
func (*ConsumerGroupSession) GenerationID ¶
func (_m *ConsumerGroupSession) GenerationID() int32
GenerationID provides a mock function with given fields:
func (*ConsumerGroupSession) MarkMessage ¶
func (_m *ConsumerGroupSession) MarkMessage(msg *sarama.ConsumerMessage, metadata string)
MarkMessage provides a mock function with given fields: msg, metadata
func (*ConsumerGroupSession) MarkOffset ¶
func (_m *ConsumerGroupSession) MarkOffset(topic string, partition int32, offset int64, metadata string)
MarkOffset provides a mock function with given fields: topic, partition, offset, metadata
func (*ConsumerGroupSession) MemberID ¶
func (_m *ConsumerGroupSession) MemberID() string
MemberID provides a mock function with given fields:
func (*ConsumerGroupSession) ResetOffset ¶
func (_m *ConsumerGroupSession) ResetOffset(topic string, partition int32, offset int64, metadata string)
ResetOffset provides a mock function with given fields: topic, partition, offset, metadata