mocks

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumerGroup

type ConsumerGroup struct {
	mock.Mock
}

ConsumerGroup is an autogenerated mock type for the ConsumerGroup type

func NewConsumerGroup

func NewConsumerGroup(t mockConstructorTestingTNewConsumerGroup) *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.

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 mockConstructorTestingTNewConsumerGroupClaim) *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.

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 ConsumerGroupHandler

type ConsumerGroupHandler struct {
	mock.Mock
}

ConsumerGroupHandler is an autogenerated mock type for the ConsumerGroupHandler type

func NewConsumerGroupHandler

func NewConsumerGroupHandler(t mockConstructorTestingTNewConsumerGroupHandler) *ConsumerGroupHandler

NewConsumerGroupHandler creates a new instance of ConsumerGroupHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*ConsumerGroupHandler) Cleanup

Cleanup provides a mock function with given fields: _a0

func (*ConsumerGroupHandler) ConsumeClaim

ConsumeClaim provides a mock function with given fields: _a0, _a1

func (*ConsumerGroupHandler) Setup

Setup provides a mock function with given fields: _a0

type ConsumerGroupSession

type ConsumerGroupSession struct {
	mock.Mock
}

ConsumerGroupSession is an autogenerated mock type for the ConsumerGroupSession type

func NewConsumerGroupSession

func NewConsumerGroupSession(t mockConstructorTestingTNewConsumerGroupSession) *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.

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

type MockProducer

type MockProducer struct {
	mock.Mock
}

MockProducer is an autogenerated mock type for the Producer type

func NewMockProducer

func NewMockProducer(t mockConstructorTestingTNewMockProducer) *MockProducer

NewMockProducer creates a new instance of MockProducer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockProducer) EXPECT

func (_m *MockProducer) EXPECT() *MockProducer_Expecter

func (*MockProducer) Produce

func (_m *MockProducer) Produce(msg *sarama.ProducerMessage) error

Produce provides a mock function with given fields: msg

type MockProducer_Expecter

type MockProducer_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockProducer_Expecter) Produce

func (_e *MockProducer_Expecter) Produce(msg interface{}) *MockProducer_Produce_Call

Produce is a helper method to define mock.On call

  • msg *sarama.ProducerMessage

type MockProducer_Produce_Call

type MockProducer_Produce_Call struct {
	*mock.Call
}

MockProducer_Produce_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Produce'

func (*MockProducer_Produce_Call) Return

func (*MockProducer_Produce_Call) Run

func (*MockProducer_Produce_Call) RunAndReturn

type StdLogger

type StdLogger struct {
	mock.Mock
}

StdLogger is an autogenerated mock type for the StdLogger type

func NewStdLogger

func NewStdLogger(t mockConstructorTestingTNewStdLogger) *StdLogger

NewStdLogger creates a new instance of StdLogger. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*StdLogger) Print

func (_m *StdLogger) Print(v ...interface{})

Print provides a mock function with given fields: v

func (*StdLogger) Printf

func (_m *StdLogger) Printf(format string, v ...interface{})

Printf provides a mock function with given fields: format, v

func (*StdLogger) Println

func (_m *StdLogger) Println(v ...interface{})

Println provides a mock function with given fields: v

type SyncProducer

type SyncProducer struct {
	mock.Mock
}

SyncProducer is an autogenerated mock type for the SyncProducer type

func NewSyncProducer

func NewSyncProducer(t mockConstructorTestingTNewSyncProducer) *SyncProducer

NewSyncProducer creates a new instance of SyncProducer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*SyncProducer) AbortTxn

func (_m *SyncProducer) AbortTxn() error

AbortTxn provides a mock function with given fields:

func (*SyncProducer) AddMessageToTxn

func (_m *SyncProducer) AddMessageToTxn(msg *sarama.ConsumerMessage, groupId string, metadata *string) error

AddMessageToTxn provides a mock function with given fields: msg, groupId, metadata

func (*SyncProducer) AddOffsetsToTxn

func (_m *SyncProducer) AddOffsetsToTxn(offsets map[string][]*sarama.PartitionOffsetMetadata, groupId string) error

AddOffsetsToTxn provides a mock function with given fields: offsets, groupId

func (*SyncProducer) BeginTxn

func (_m *SyncProducer) BeginTxn() error

BeginTxn provides a mock function with given fields:

func (*SyncProducer) Close

func (_m *SyncProducer) Close() error

Close provides a mock function with given fields:

func (*SyncProducer) CommitTxn

func (_m *SyncProducer) CommitTxn() error

CommitTxn provides a mock function with given fields:

func (*SyncProducer) IsTransactional

func (_m *SyncProducer) IsTransactional() bool

IsTransactional provides a mock function with given fields:

func (*SyncProducer) SendMessage

func (_m *SyncProducer) SendMessage(msg *sarama.ProducerMessage) (int32, int64, error)

SendMessage provides a mock function with given fields: msg

func (*SyncProducer) SendMessages

func (_m *SyncProducer) SendMessages(msgs []*sarama.ProducerMessage) error

SendMessages provides a mock function with given fields: msgs

func (*SyncProducer) TxnStatus

func (_m *SyncProducer) TxnStatus() sarama.ProducerTxnStatusFlag

TxnStatus provides a mock function with given fields:

Jump to

Keyboard shortcuts

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