saramaproducer

package
v0.0.0-...-18de4b0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(setters ...Setter) (producer.Producer, error)

Types

type Producer

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

func (*Producer) AsyncSendMsg

func (p *Producer) AsyncSendMsg(ctx context.Context, topic string, key string, msg any) error

func (*Producer) SyncSendMsg

func (p *Producer) SyncSendMsg(ctx context.Context, topic string, key string, msg any) error

type Setter

type Setter func(p *Producer)

func SetAddr

func SetAddr(addr ...string) Setter

func SetMsgType

func SetMsgType(msgType message.MsgType) Setter

func SetSaramaConfig

func SetSaramaConfig(config *sarama.Config) Setter

Jump to

Keyboard shortcuts

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