producer

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Code generated by options-gen. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DummyProducer

type DummyProducer struct{}

func NewDummy

func NewDummy() DummyProducer

func (DummyProducer) Close

func (DummyProducer) Close(ctx context.Context) error

func (DummyProducer) Stats

func (DummyProducer) Stats() Stats

func (DummyProducer) WriteMessages

func (DummyProducer) WriteMessages(ctx context.Context, msgs ...Message) error
type Header struct {
	Key   []byte
	Value []byte
}

type Message

type Message struct {
	Offset        int64
	HighWaterMark int64
	Key           []byte
	Value         []byte
	Headers       []Header
}

type OptOptionsSetter

type OptOptionsSetter func(o *Options)

func WithClientID

func WithClientID(opt string) OptOptionsSetter

func WithTls

func WithTls(opt bool) OptOptionsSetter

func WithTopic

func WithTopic(opt string) OptOptionsSetter

type Options

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

func NewOptions

func NewOptions(
	addrs []string,
	options ...OptOptionsSetter,
) Options

func (*Options) Validate

func (o *Options) Validate() error

type Producer

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

func New

func New(opts Options) (*Producer, error)

func (Producer) Close

func (p Producer) Close(_ context.Context) error

func (Producer) Stats

func (p Producer) Stats() Stats

func (Producer) WriteMessages

func (p Producer) WriteMessages(ctx context.Context, msgs ...Message) error

type Stats

type Stats = kafka.WriterStats

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳