publisher

package
v0.7.10 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package publisher provides a basic kafka event publisher

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KafkaPublisher

type KafkaPublisher struct {
	// Broker is a list of Kafka brokers
	Broker []string
	// Config is the configuration for the Kafka event source
	Config kafkaconfig.Config
}

KafkaPublisher is a publisher that sends messages to a Kafka topic

func NewKafkaPublisher

func NewKafkaPublisher(broker []string) *KafkaPublisher

NewKafkaPublisher creates a new KafkaPublisher

func (*KafkaPublisher) Publish

func (kp *KafkaPublisher) Publish(topic string, message []byte) error

Publish satisfies the Publisher interface

type Publisher

type Publisher interface {
	Publish(topic string, message []byte) error
}

Publisher is an interface for publishing messages

Jump to

Keyboard shortcuts

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