publisher

package
v1.39.2 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

type Middleware func(next RoundTripper) RoundTripper

type Option

type Option func(p *Publisher)

func WithMiddlewares

func WithMiddlewares(mws ...Middleware) Option

type Publisher

type Publisher struct {
	Writer *kafka.Writer
	// contains filtered or unexported fields
}

func New

func New(writer *kafka.Writer, topic string, opts ...Option) *Publisher

func (*Publisher) Close

func (p *Publisher) Close() error

func (*Publisher) Healthcheck

func (p *Publisher) Healthcheck(_ context.Context) error

func (*Publisher) Publish

func (p *Publisher) Publish(ctx context.Context, msgs ...kafka.Message) error

type RoundTripper

type RoundTripper interface {
	Publish(ctx context.Context, msgs ...kafka.Message) error
}

type RoundTripperFunc

type RoundTripperFunc func(ctx context.Context, msgs ...kafka.Message) error

func (RoundTripperFunc) Publish

func (f RoundTripperFunc) Publish(ctx context.Context, msgs ...kafka.Message) error

Jump to

Keyboard shortcuts

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