kafka

package
v0.15.6-rc.1 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticationConfig

type AuthenticationConfig struct {
	Username string
	Password string
}

type Config

type Config struct {
	BrokerURLs      []string
	Topic           string
	Authentication  *AuthenticationConfig
	SSLVerification bool
}

type ProduceMessageResult

type ProduceMessageResult struct {
	Topic     string
	Partition string
	Offset    string
}

type Producer

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

func GetProducer

func GetProducer(kafkaConfig Config) (*Producer, error)

func (*Producer) Close

func (p *Producer) Close()

func (*Producer) ProduceSyncMessage

func (p *Producer) ProduceSyncMessage(ctx context.Context, messageKey, messageValue string, headers map[string]string) (ProduceMessageResult, error)

Jump to

Keyboard shortcuts

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