consumer

package
v0.0.0-...-da226d4 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 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 Consumer

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

func New

func New(ctx context.Context, hosts []string, topic, group, id string, partition int, options ...Option) (*Consumer, error)

func (*Consumer) Close

func (c *Consumer) Close() error

func (*Consumer) Consume

func (c *Consumer) Consume(ctx context.Context, processor func(ctx context.Context, list kpkg.MessageList) error) error

func (*Consumer) GetGroup

func (c *Consumer) GetGroup() string

func (*Consumer) GetHosts

func (c *Consumer) GetHosts() []string

func (*Consumer) GetID

func (c *Consumer) GetID() string

func (*Consumer) GetTopic

func (c *Consumer) GetTopic() string

type Option

type Option func(conf *conf)

func WithBatchSize

func WithBatchSize(value int) Option

func WithCredentials

func WithCredentials(algo, user, password, cert string) Option

func WithLog

func WithLog() Option

Jump to

Keyboard shortcuts

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