datasource

package
v2.0.8 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FeatureLogToKafka

func FeatureLogToKafka(kafkaName string, f FeatureLogKafkaFunc)

func Load

func Load(config *recconf.RecommendConfig)

Types

type FeatureLogKafkaFunc

type FeatureLogKafkaFunc func(*KafkaProducer, *module.User, []*module.Item, *context.RecommendContext)

type KafkaLog

type KafkaLog struct{}

func (*KafkaLog) Errorf

func (l *KafkaLog) Errorf(msg string, args ...interface{})

type KafkaProducer

type KafkaProducer struct {
	BootstrapServers string
	Topic            string
	Producer         *kafka.Writer
}

func GetKafkaProducer

func GetKafkaProducer(name string) (*KafkaProducer, error)

func NewKafkaProducer

func NewKafkaProducer(bootstrapServers, topic string) *KafkaProducer

func (*KafkaProducer) Close

func (k *KafkaProducer) Close()

func (*KafkaProducer) Init

func (k *KafkaProducer) Init() error

func (*KafkaProducer) SendMessage

func (k *KafkaProducer) SendMessage(message string)

Directories

Path Synopsis
ha3client
This file is auto-generated, don't edit it.
This file is auto-generated, don't edit it.
sls

Jump to

Keyboard shortcuts

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