kafka

package
v0.0.0-...-cbf1298 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

*********************************************************************************************** *** G O L A N D *** *********************************************************************************************** * Auth: ColeCai * Date: 2023/10/16 14:59:19 * Proj: work * Pack: kafka * File: kafka.go *---------------------------------------------------------------------------------------------- * Overviews: *---------------------------------------------------------------------------------------------- * Functions: * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KafkaReader

type KafkaReader struct {
	*kafka.Reader
	// contains filtered or unexported fields
}

func NewKafkaReader

func NewKafkaReader(addrs []string, topic string, execute KafkaReaderExecute) *KafkaReader

func (*KafkaReader) ReadMessages

func (k *KafkaReader) ReadMessages()

type KafkaReaderExecute

type KafkaReaderExecute func(val []byte, header []kafka.Header)

type KafkaWriter

type KafkaWriter struct {
	*kafka.Writer
	// contains filtered or unexported fields
}

func NewKafkaClient

func NewKafkaClient(addr string, timeOut time.Duration) *KafkaWriter

func (*KafkaWriter) SendMessage

func (k *KafkaWriter) SendMessage(topic string, msg []byte, header []kafka.Header) error

Jump to

Keyboard shortcuts

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