kafka

package
v0.0.0-...-a1db402 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTopic

func CreateTopic(addrs []string, cfg Config) error

CreateTopic creates Kafka topic to produces website checks onto if it does not exist.

Types

type Config

type Config struct {
	TLS struct {
		CAFile   string
		KeyFile  string
		CertFile string
	}
}

Config defines the Kafka connection configuration

type Producer

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

Producer generates the website checks into a Kafka topic

func NewProducer

func NewProducer(addrs []string, cfg Config) (*Producer, error)

NewProducer handles the creation of the async producers and associated GoRoutines

func (*Producer) Close

func (p *Producer) Close()

Close closes the resources of the producer

func (*Producer) Produce

Produce produces a website check

Jump to

Keyboard shortcuts

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