producer

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfluentProducer

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

func NewConfluentProducer

func NewConfluentProducer(kafkaURLs []string, topic string) (*ConfluentProducer, error)

NewConfluentProducer create a new Confluent Producer.

func (ConfluentProducer) Close

func (confluent ConfluentProducer) Close()

func (ConfluentProducer) Publish

func (confluent ConfluentProducer) Publish(key, message string) error

type Producer

type Producer interface {
	Publish(key, msg string) error
	Close()
}

Producer to publish to kafka.

type SaramaProducer

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

func NewSaramaProducer

func NewSaramaProducer(kafkaURLs []string, topic string) (*SaramaProducer, error)

NewSaramaProducer Create new Sarama Producer.

func (SaramaProducer) Close

func (saramaProducer SaramaProducer) Close()

func (SaramaProducer) Publish

func (saramaProducer SaramaProducer) Publish(key, message string) error

type SegmentioProducer

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

func NewSegmentioProducer

func NewSegmentioProducer(kafkaURLs []string, topic string) (*SegmentioProducer, error)

NewSegmentioProducer Create new Segmentio Producer.

func (SegmentioProducer) Close

func (segmentio SegmentioProducer) Close()

func (SegmentioProducer) Publish

func (segmentio SegmentioProducer) Publish(key, message string) error

Jump to

Keyboard shortcuts

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