skafka

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: May 17, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKafkaConfig

func GetKafkaConfig() (config, error)

func GetSaramaConfig

func GetSaramaConfig(ctx context.Context, cfg config, deps Dependencies) (*sarama.Config, error)

Types

type Dependencies

type Dependencies struct {
	ClientID string
	Logger   slogger.Logger
}

type SConsumer added in v1.2.1

type SConsumer interface {
	Fetch(ctx context.Context, topic string, offset int)
	Close() error
}

type SKafka added in v1.2.1

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

func NewKafkaClient

func NewKafkaClient(ctx context.Context, deps Dependencies) (*SKafka, error)

func (*SKafka) Close added in v1.2.1

func (k *SKafka) Close() error

func (*SKafka) Publish added in v1.2.1

func (k *SKafka) Publish(ctx context.Context, topic string, key, value []byte) error

type SProducer added in v1.2.1

type SProducer interface {
	Publish(ctx context.Context, topic string, key, value []byte) error
	Close() error
}

func NewSProducer added in v1.2.1

func NewSProducer(ctx context.Context, deps Dependencies) (SProducer, error)

Jump to

Keyboard shortcuts

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