Documentation ¶
Index ¶
- func NonValidatingNewSyncProducerFn(mockSyncProducer sarama.SyncProducer) wrapper.NewSyncProducerFnType
- func RestoreNewSyncProducerFn()
- func StubNewSyncProducerFn(stubNewSyncProducerFn wrapper.NewSyncProducerFnType)
- func ValidatingNewSyncProducerFn(t *testing.T, expectedBrokers []string, expectedConfig *sarama.Config, ...) wrapper.NewSyncProducerFnType
- type MockSyncProducer
- func (p *MockSyncProducer) Close() error
- func (p *MockSyncProducer) Closed() bool
- func (p *MockSyncProducer) GetMessage() sarama.ProducerMessage
- func (p *MockSyncProducer) SendMessage(msg *sarama.ProducerMessage) (partition int32, offset int64, err error)
- func (p *MockSyncProducer) SendMessages(_ []*sarama.ProducerMessage) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NonValidatingNewSyncProducerFn ¶
func NonValidatingNewSyncProducerFn(mockSyncProducer sarama.SyncProducer) wrapper.NewSyncProducerFnType
Non-Validating NewSyncProducer Function
func RestoreNewSyncProducerFn ¶
func RestoreNewSyncProducerFn()
Restore The NewSyncProducerFn To Official Production Value
func StubNewSyncProducerFn ¶
func StubNewSyncProducerFn(stubNewSyncProducerFn wrapper.NewSyncProducerFnType)
Replace The NewSyncProducerFn With Specified Mock / Test Value
func ValidatingNewSyncProducerFn ¶
func ValidatingNewSyncProducerFn(t *testing.T, expectedBrokers []string, expectedConfig *sarama.Config, mockSyncProducer sarama.SyncProducer) wrapper.NewSyncProducerFnType
Validating NewSyncProducer Function
Types ¶
type MockSyncProducer ¶
type MockSyncProducer struct {
// contains filtered or unexported fields
}
func NewMockSyncProducer ¶
func NewMockSyncProducer() *MockSyncProducer
func (*MockSyncProducer) Close ¶
func (p *MockSyncProducer) Close() error
func (*MockSyncProducer) Closed ¶
func (p *MockSyncProducer) Closed() bool
func (*MockSyncProducer) GetMessage ¶
func (p *MockSyncProducer) GetMessage() sarama.ProducerMessage
func (*MockSyncProducer) SendMessage ¶
func (p *MockSyncProducer) SendMessage(msg *sarama.ProducerMessage) (partition int32, offset int64, err error)
func (*MockSyncProducer) SendMessages ¶
func (p *MockSyncProducer) SendMessages(_ []*sarama.ProducerMessage) error
Click to show internal directories.
Click to hide internal directories.