kafka

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseProducer

func CloseProducer(ctx context.Context, pi interface{}) error

CloseProducer closes a given producer

func Init

func Init()

func NewProducer

func NewProducer(destConfigJSON interface{}, o Opts) (*producerImpl, error)

NewProducer creates a producer based on destination config

func NewProducerForAzureEventHubs

func NewProducerForAzureEventHubs(destinationConfig interface{}, o Opts) (*producerImpl, error)

NewProducerForAzureEventHubs creates a producer for Azure event hub based on destination config

func NewProducerForConfluentCloud

func NewProducerForConfluentCloud(destinationConfig interface{}, o Opts) (*producerImpl, error)

NewProducerForConfluentCloud creates a producer for Confluent cloud based on destination config

func Produce

func Produce(jsonData json.RawMessage, pi interface{}, destConfig interface{}) (int, string, string)

Produce creates a producer and send data to Kafka.

Types

type Opts

type Opts struct {
	Timeout time.Duration
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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