kafka

package
v0.0.0-...-2b644c5 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseVersion

func ParseVersion(config *sarama.Config, version string) error

Types

type Producer

type Producer struct {
	SyncProducer sarama.SyncProducer
	Topic        string
}

func (Producer) Publish

func (p Producer) Publish(topicPostfix, k string, vv []byte) (*PublishResponse, error)

type ProducerConfig

type ProducerConfig struct {
	Topic   string
	Version string
	Brokers []string

	TlsConfig
}

func (ProducerConfig) NewSyncProducer

func (c ProducerConfig) NewSyncProducer() (*Producer, error)

type PublishResponse

type PublishResponse struct {
	Partition int32  `json:"partition"`
	Offset    int64  `json:"offset"`
	Topic     string `json:"topic"`
}

type TlsConfig

type TlsConfig struct {
	CaFile, CertFile, KeyFile string
	InsecureSkipVerify        bool
}

func (TlsConfig) CreateTlsConfig

func (tc TlsConfig) CreateTlsConfig() *tls.Config

Jump to

Keyboard shortcuts

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