kafkapubsub

package
v0.0.0-...-bdd4da6 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PublisherType = "kafka"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Brokers []string `mapstructure:"brokers"`
	Topic   string   `mapstructure:"topic"`
}

type KafkaPubSub

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

func FromConfig

func FromConfig(ctx context.Context, config Config) (*KafkaPubSub, error)

func New

func New(ctx context.Context, brokers []string, topic string) (*KafkaPubSub, error)

func (*KafkaPubSub) Name

func (pub *KafkaPubSub) Name() string

func (*KafkaPubSub) Send

func (pub *KafkaPubSub) Send(ctx context.Context, body []byte) error

Jump to

Keyboard shortcuts

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