consumer

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, core *Core)

New starts a Kafka consumer that manually commits messages.

Parameters:

  • ctx: The context for managing the lifecycle of the function.
  • core: A pointer to the Core struct containing necessary dependencies.

This function continuously listens for Kafka consumers and processes messages from specific topics. It runs indefinitely until the context is cancelled.

func NewAutoSubmit

func NewAutoSubmit(ctx context.Context, core *Core)

NewAutoSubmit starts a Kafka consumer for auto-submission.

Parameters:

  • ctx: The context for managing the lifecycle of the function.
  • core: A pointer to the Core struct containing necessary dependencies.

This function continuously listens for messages on specific Kafka topics and processes them accordingly. It runs indefinitely until the context is cancelled.

Types

type Core

type Core struct {
	Logger        *logger.Manager
	Redis         *redis.Manager
	MysqlDB       map[string]*gorm.DB
	KafkaConsumer *kafka.Manager
}

Core represents the core dependencies required for the consumer package.

Jump to

Keyboard shortcuts

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