utils

package
v0.12.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	BrokerConfigMapKey    = "bootstrapServers"
	KafkaChannelSeparator = "."

	// DefaultNumPartitions defines the default number of partitions
	DefaultNumPartitions = 1

	// DefaultReplicationFactor defines the default number of replications
	DefaultReplicationFactor = 1

	DefaultMaxIdleConns        = 1000
	DefaultMaxIdleConnsPerHost = 100
)

Variables

This section is empty.

Functions

func KafkaConfigMapObserver added in v0.9.0

func KafkaConfigMapObserver(logger *zap.SugaredLogger) func(configMap *corev1.ConfigMap)

We skip the first call into KafkaConfigMapObserver because it is not an indication of change of the watched ConfigMap but the map's initial state. See the comment for knative.dev/pkg/configmap/watcher.Start()

func TopicName

func TopicName(separator, namespace, name string) string

Types

type KafkaConfig

type KafkaConfig struct {
	Brokers             []string
	MaxIdleConns        int
	MaxIdleConnsPerHost int
}

func GetKafkaConfig

func GetKafkaConfig(path string) (*KafkaConfig, error)

GetKafkaConfig returns the details of the Kafka cluster.

Jump to

Keyboard shortcuts

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