kafka

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package kafka is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfig

func DefaultConfig() *sarama.Config

Types

type Client

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

func NewClient

func NewClient(addr []string) (*Client, error)

func (*Client) Close

func (c *Client) Close() (err error)

func (*Client) SendMessage

func (c *Client) SendMessage(topic string, routeKey string, event []byte) (err error)

type MockPublisher

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

MockPublisher is a mock of Publisher interface

func NewMockPublisher

func NewMockPublisher(ctrl *gomock.Controller) *MockPublisher

NewMockPublisher creates a new mock instance

func (*MockPublisher) Close

func (m *MockPublisher) Close() error

Close mocks base method

func (*MockPublisher) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockPublisher) Publish

func (m *MockPublisher) Publish(ctx context.Context, topic, routeKey string, event []byte) error

Publish mocks base method

type MockPublisherMockRecorder

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

MockPublisherMockRecorder is the mock recorder for MockPublisher

func (*MockPublisherMockRecorder) Close

func (mr *MockPublisherMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close

func (*MockPublisherMockRecorder) Publish

func (mr *MockPublisherMockRecorder) Publish(ctx, topic, routeKey, event interface{}) *gomock.Call

Publish indicates an expected call of Publish

type Publisher

type Publisher interface {
	Publish(ctx context.Context, topic string, routeKey string, event []byte) error
	Close() error
}

func New

func New(cli *Client) (Publisher, error)

Jump to

Keyboard shortcuts

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