kafka

package
v0.0.0-...-362a82f Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	GroupId  string
	Broker   string
	Username string
	Password string
	Logger   logging.Logger
}

type Kafka

type Kafka struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New(config Config) (*Kafka, error)

func (*Kafka) Close

func (k *Kafka) Close() error

func (*Kafka) EmitKeyEvent

func (k *Kafka) EmitKeyEvent(ctx context.Context, e events.KeyEvent)

EmitKeyEvent writes to a channel and returns immediately, it does not wait for acks from kafka

func (*Kafka) OnKeyEvent

func (k *Kafka) OnKeyEvent(handler func(ctx context.Context, e events.KeyEvent) error)

func (*Kafka) Start

func (k *Kafka) Start()

Starts all goroutines

Jump to

Keyboard shortcuts

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