utils

package
v0.18.7 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: Apache-2.0 Imports: 10 Imported by: 4

Documentation

Index

Constants

View Source
const (
	BrokerConfigMapKey           = "bootstrapServers"
	AuthSecretName               = "authSecretName"
	AuthSecretNamespace          = "authSecretNamespace"
	MaxIdleConnectionsKey        = "maxIdleConns"
	MaxIdleConnectionsPerHostKey = "maxIdleConnsPerHost"

	TlsCacert    = "ca.crt"
	TlsUsercert  = "user.crt"
	TlsUserkey   = "user.key"
	SaslUser     = "user"
	SaslPassword = "password"
	SaslType     = "saslType"

	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 FindContainer added in v0.18.0

func FindContainer(d *appsv1.Deployment, containerName string) *corev1.Container

func TopicName

func TopicName(separator, namespace, name string) string

Types

type KafkaAuthConfig added in v0.18.6

type KafkaAuthConfig struct {
	TLS  *KafkaTlsConfig
	SASL *KafkaSaslConfig
}

func GetKafkaAuthData added in v0.18.6

func GetKafkaAuthData(ctx context.Context, secretname string, secretNS string) *KafkaAuthConfig

type KafkaConfig

type KafkaConfig struct {
	Brokers             []string
	MaxIdleConns        int32
	MaxIdleConnsPerHost int32
	AuthSecretName      string
	AuthSecretNamespace string
}

func GetKafkaConfig

func GetKafkaConfig(configMap map[string]string) (*KafkaConfig, error)

GetKafkaConfig returns the details of the Kafka cluster.

type KafkaSaslConfig added in v0.18.6

type KafkaSaslConfig struct {
	User     string
	Password string
	SaslType string
}

type KafkaTlsConfig added in v0.18.6

type KafkaTlsConfig struct {
	Cacert   string
	Usercert string
	Userkey  string
}

Jump to

Keyboard shortcuts

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