producer

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory interface {
	Get(name string) Producer
}

func NewFactory

func NewFactory(cfg *config.Config, interceptors []Interceptor) (Factory, error)

type InterceptNextFunc

type InterceptNextFunc func(ctx context.Context, msg ...Message) error

type Interceptor

type Interceptor interface {
	Intercept(ctx context.Context, msgs []Message, next InterceptNextFunc) error
}

type InterceptorFunc

type InterceptorFunc func(ctx context.Context, msgs []Message, next InterceptNextFunc) error

func (InterceptorFunc) Intercept

func (f InterceptorFunc) Intercept(ctx context.Context, msgs []Message, next InterceptNextFunc) error

type Message

type Message = kafkalib.Message

type Producer

type Producer interface {
	Produce(context.Context, ...Message) error
}

Jump to

Keyboard shortcuts

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