kafka

package
v0.0.0-...-ae3587a Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2020 License: LGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInstaPostsScraperConfig

func GetInstaPostsScraperConfig() (*ReaderConfig, *WriterConfig, *WriterConfig)

GetInstaPostsScraperConfig is a convenience function for gathering the necessary kafka configuration for the insta posts golang scrapers

func GetScraperConfig

func GetScraperConfig() (*ReaderConfig, *WriterConfig, *WriterConfig)

GetScraperConfig is a convenience function for gathering the necessary kafka configuration for all golang scrapers

func NewReader

func NewReader(c *ReaderConfig) *kafka.Reader

NewReader creates a kafka-go Reader structure by using common configuration and additionally applying the ReaderConfig on it

func NewWriter

func NewWriter(c *WriterConfig) *kafka.Writer

NewWriter creates a kafka-go Writer structure by using common configurations and additionally applying the WriterConfig on it

Types

type ReaderConfig

type ReaderConfig struct {
	Address string
	GroupID string
	Topic   string
}

ReaderConfig is an internal helper structure for creating a new pre-configurated kafka-go Reader

func GetInserterConfig

func GetInserterConfig() *ReaderConfig

GetInserterConfig returns the Reader topics from kafka for Inserters

func NewReaderConfig

func NewReaderConfig(kafkaAddress, groupID, topic string) *ReaderConfig

NewReaderConfig creates a new ReaderConfig structure

type WriterConfig

type WriterConfig struct {
	Address string
	Topic   string
	Async   bool
}

WriterConfig is an internal helper structure for creating a new pre-configurated kafka-go Writer

func NewWriterConfig

func NewWriterConfig(kafkaAddress, topic string, async bool) *WriterConfig

NewWriterConfig creates a new WriterConfig structure

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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