kafka

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2019 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stream

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

Stream implementation of Streamer interface for the Kafka driver

func MustNewStream

func MustNewStream(brokerList []string, topics []string, conf *sarama.Config) *Stream

func NewStream

func NewStream(brokerList []string, topics []string, conf *sarama.Config) (*Stream, error)

NewStream to the kafka with some brokers and topics for sending

func (*Stream) Close

func (s *Stream) Close() error

Close kafka producer

func (*Stream) Send

func (s *Stream) Send(messages ...interface{}) (err error)

Send messages to the KAFKA stream

type Subscriber

type Subscriber struct {
	subscriber.Base
	// contains filtered or unexported fields
}

Subscriber for kafka

func NewSubscriber

func NewSubscriber(brokers []string, group string, topics []string, configArgs ...*cluster.Config) (*Subscriber, error)

NewSubscriber connection to kafka "group" from list of topics

func (*Subscriber) Close

func (s *Subscriber) Close() (err error)

Close kafka consumer

func (*Subscriber) Listen

func (s *Subscriber) Listen() (err error)

Listen kafka consumer

func (*Subscriber) SetLogger

func (s *Subscriber) SetLogger(logger loggerInterface)

SetLogger interface

Jump to

Keyboard shortcuts

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