kafka

package
v0.0.0-...-50dcd87 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInputChannelBlocked = errors.New("input channel blocked")
)

Functions

func DefaultProducerConfig

func DefaultProducerConfig() sarama.Config

Types

type KafkaConfig

type KafkaConfig struct {
	SaramaConfig sarama.Config
	Host         string
	Topic        string
}

type KafkaWriter

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

func NewKafkaWriter

func NewKafkaWriter(config KafkaConfig, fail func(msg []byte, err error), success func(msg []byte)) (*KafkaWriter, error)

func (*KafkaWriter) Sync

func (ws *KafkaWriter) Sync() error

func (*KafkaWriter) Write

func (ws *KafkaWriter) Write(b []byte) (n int, err error)

Jump to

Keyboard shortcuts

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