base

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Batch

func Batch[T any](n int, d time.Duration, in <-chan T) <-chan []T

Batch returns a read only channel that receives values from the input channel batched together into a slice. A value is sent to the output channel when the slice reaches n elements, or d time has elapsed, whichever happens first. Ordering is maintained.

func EventKey

func EventKey(source string, subject string) string

Types

type Kafka

type Kafka struct {
	Logger *zap.SugaredLogger
	// contains filtered or unexported fields
}

func NewKafka

func NewKafka(config *eventbusv1alpha1.KafkaBus, logger *zap.SugaredLogger) *Kafka

func (*Kafka) Brokers

func (k *Kafka) Brokers() []string

func (*Kafka) Config

func (k *Kafka) Config() (*sarama.Config, error)

type KafkaConnection

type KafkaConnection struct {
	Logger *zap.SugaredLogger
}

func NewKafkaConnection

func NewKafkaConnection(logger *zap.SugaredLogger) *KafkaConnection

Jump to

Keyboard shortcuts

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