cloud

package
v1.0.42 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTopics

func GetTopics(bootstrapKafkaUrl string, regex *regexp.Regexp) (result []string, err error)

func GetWorkerTopics

func GetWorkerTopics(config configuration.Config) (result []string, err error)

func ImportIdToTopic

func ImportIdToTopic(id string) string

func InitTopics

func InitTopics(bootstrapUrl string, config []kafka.ConfigEntry, topics ...string) (err error)

func NewKafkaLastOffsetConsumer

func NewKafkaLastOffsetConsumer(ctx context.Context, wg *sync.WaitGroup, broker string, groupId string, topic string, listener func(delivery []byte) error, errhandler func(err error)) error

func NewKafkaLastOffsetConsumerGroup

func NewKafkaLastOffsetConsumerGroup(ctx context.Context, wg *sync.WaitGroup, broker string, groupId string, topics []string, listener func(msg model.ConsumerMessage) error, errhandler func(topic string, err error)) error

func ServiceIdToTopic

func ServiceIdToTopic(id string) string

func Start

func Start(basectx context.Context, wg *sync.WaitGroup, config configuration.Config, worker Worker) error

Types

type UpdatableConsumer added in v1.0.38

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

func NewUpdatableConsumer added in v1.0.38

func NewUpdatableConsumer(ctx context.Context, config configuration.Config, onMsg func(msg model.ConsumerMessage) error, onError func(topic string, err error)) *UpdatableConsumer

func (*UpdatableConsumer) UpdateTopics added in v1.0.38

func (this *UpdatableConsumer) UpdateTopics(topics []string) error

type Worker

type Worker interface {
	Do(msg model.ConsumerMessage) error
	HandleDeploymentUpdateSignal()
}

Jump to

Keyboard shortcuts

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