saramamocks

package
v0.0.0-...-d3d27b2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	mock.Mock
}

Client is an autogenerated mock type for the Client type

func NewClient

func NewClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *Client

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) Broker

func (_m *Client) Broker(brokerID int32) (*sarama.Broker, error)

Broker provides a mock function with given fields: brokerID

func (*Client) Brokers

func (_m *Client) Brokers() []*sarama.Broker

Brokers provides a mock function with given fields:

func (*Client) Close

func (_m *Client) Close() error

Close provides a mock function with given fields:

func (*Client) Closed

func (_m *Client) Closed() bool

Closed provides a mock function with given fields:

func (*Client) Config

func (_m *Client) Config() *sarama.Config

Config provides a mock function with given fields:

func (*Client) Controller

func (_m *Client) Controller() (*sarama.Broker, error)

Controller provides a mock function with given fields:

func (*Client) Coordinator

func (_m *Client) Coordinator(consumerGroup string) (*sarama.Broker, error)

Coordinator provides a mock function with given fields: consumerGroup

func (*Client) GetOffset

func (_m *Client) GetOffset(topic string, partitionID int32, time int64) (int64, error)

GetOffset provides a mock function with given fields: topic, partitionID, time

func (*Client) InSyncReplicas

func (_m *Client) InSyncReplicas(topic string, partitionID int32) ([]int32, error)

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) Leader

func (_m *Client) Leader(topic string, partitionID int32) (*sarama.Broker, error)

Leader provides a mock function with given fields: topic, partitionID

func (*Client) LeaderAndEpoch

func (_m *Client) LeaderAndEpoch(topic string, partitionID int32) (*sarama.Broker, int32, error)

LeaderAndEpoch provides a mock function with given fields: topic, partitionID

func (*Client) LeastLoadedBroker

func (_m *Client) LeastLoadedBroker() *sarama.Broker

LeastLoadedBroker provides a mock function with given fields:

func (*Client) OfflineReplicas

func (_m *Client) OfflineReplicas(topic string, partitionID int32) ([]int32, error)

OfflineReplicas provides a mock function with given fields: topic, partitionID

func (*Client) Partitions

func (_m *Client) Partitions(topic string) ([]int32, error)

Partitions provides a mock function with given fields: topic

func (*Client) RefreshBrokers

func (_m *Client) RefreshBrokers(addrs []string) error

RefreshBrokers provides a mock function with given fields: addrs

func (*Client) RefreshController

func (_m *Client) RefreshController() (*sarama.Broker, error)

RefreshController provides a mock function with given fields:

func (*Client) RefreshCoordinator

func (_m *Client) RefreshCoordinator(consumerGroup string) error

RefreshCoordinator provides a mock function with given fields: consumerGroup

func (*Client) RefreshMetadata

func (_m *Client) RefreshMetadata(topics ...string) error

RefreshMetadata provides a mock function with given fields: topics

func (*Client) RefreshTransactionCoordinator

func (_m *Client) RefreshTransactionCoordinator(transactionID string) error

RefreshTransactionCoordinator provides a mock function with given fields: transactionID

func (*Client) Replicas

func (_m *Client) Replicas(topic string, partitionID int32) ([]int32, error)

Replicas provides a mock function with given fields: topic, partitionID

func (*Client) Topics

func (_m *Client) Topics() ([]string, error)

Topics provides a mock function with given fields:

func (*Client) TransactionCoordinator

func (_m *Client) TransactionCoordinator(transactionID string) (*sarama.Broker, error)

TransactionCoordinator provides a mock function with given fields: transactionID

func (*Client) WritablePartitions

func (_m *Client) WritablePartitions(topic string) ([]int32, error)

WritablePartitions provides a mock function with given fields: topic

type ConsumerGroup

type ConsumerGroup struct {
	mock.Mock
}

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

type ConsumerGroupClaim struct {
	mock.Mock
}

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

type ConsumerGroupSession struct {
	mock.Mock
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL