kafka

package
v0.0.0-...-10178d1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTLSConfig

func NewTLSConfig(clientCertFile, clientKeyFile, caCertFile string) (*tls.Config, error)

NewTLSConfig generates a TLS configuration used to authenticate on server with certificates. Parameters are the three pem files path we need to authenticate: client cert, client key and CA cert.

Types

type Config

type Config struct {
	Config *sarama.Config
}

func NewConfig

func NewConfig() *Config

type KafkaWriteInfo

type KafkaWriteInfo struct {
	RemoteAddr          string
	TunnelKafkaSecurity string
	KafkaClientCer      string
	KafkaClientKey      string
	KafkaServerCer      string
	KafkaSaslUser       string
	KafkaSaslPassword   string
}

type Message

type Message struct {
	Key       []byte
	Value     []byte
	Offset    int64
	TimeStamp time.Time
}

type Reader

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

func NewReader

func NewReader(address string, consumerGroupId string) (*Reader, error)

func (*Reader) Read

func (r *Reader) Read() chan *Message

type SyncWriter

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

func NewSyncWriter

func NewSyncWriter(kafkaWriteInfo *KafkaWriteInfo) (*SyncWriter, error)

func (*SyncWriter) Close

func (s *SyncWriter) Close() error

func (*SyncWriter) SimpleWrite

func (s *SyncWriter) SimpleWrite(input []byte) error

func (*SyncWriter) Start

func (s *SyncWriter) Start() error

Jump to

Keyboard shortcuts

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