kafka

package
v0.0.0-...-7b6d186 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger *logrus.Entry

Logger provides access to the Kafka specific logging facility

Functions

func Consume

func Consume(ctx context.Context, brokers []string, topicPattern string, messages chan<- Message)

Consume function receives messages from Kafka and sends them to the `messages` channel

Types

type Message

type Message struct {
	kafka.Message
	Op         string
	TableName  string
	SchemaName string
	Keys       map[string]interface{}
	Values     map[string]interface{}
}

Message is a data structure representing kafka messages

func NewMessage

func NewMessage(msg kafka.Message) (*Message, error)

NewMessage used to create and init a new message instance

func (*Message) QualifiedTablename

func (m *Message) QualifiedTablename() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳