sarama

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

func New

func New(c sk.ConsumerConfig, options ...OptionFunc) (*Handler, error)

func (*Handler) Receive

func (h *Handler) Receive() <-chan sk.Message

func (*Handler) Run

func (h *Handler) Run() error

func (*Handler) Stop

func (h *Handler) Stop()

type Logger

type Logger interface {
	Infof(string, ...interface{})
	Errorf(string, ...interface{})
}

type Message

type Message struct {
	*sarama.ConsumerMessage
}

func (Message) Offset

func (m Message) Offset() int64

func (Message) Partition

func (m Message) Partition() int32

func (Message) Topic

func (m Message) Topic() string

func (Message) Value

func (m Message) Value() []byte

type OptionFunc

type OptionFunc func(*Handler) error

func WithLogger

func WithLogger(log Logger) OptionFunc

Jump to

Keyboard shortcuts

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