testing

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultSaramaConfigYaml = `` /* 425-byte string literal not displayed */

	DefaultEventingKafkaConfigYaml = `
receiver:
  cpuRequest: 100m
  memoryRequest: 64Mi
  replicas: 1
dispatcher:
  cpuRequest: 300m
  memoryRequest: 64Mi
  replicas: 1
kafka:
  enableSaramaLogging: false
  brokers: ` + DefaultKafkaBroker + `
  topic:
    defaultNumPartitions: 4
    defaultReplicationFactor: 1
    defaultRetentionMillis: 604800000
    adminType: kafka
`
	DefaultKafkaBroker     = "TestBroker"
	DefaultSecretUsername  = "TestUsername"
	DefaultSecretPassword  = "TestPassword"
	DefaultSecretSaslType  = "PLAIN"
	DefaultSecretNamespace = "TestNamespace"
)

Constants

Variables

This section is empty.

Functions

func NewKafkaConfigMap

func NewKafkaConfigMap(options ...KafkaConfigMapOption) *corev1.ConfigMap

Create A New Eventing-Kafka ConfigMap For Testing

func NewKafkaSecret added in v0.21.0

func NewKafkaSecret(options ...KafkaSecretOption) *corev1.Secret

Create A New Eventing-Kafka Secret For Testing

func WithEmptyUsername added in v0.21.0

func WithEmptyUsername(secret *corev1.Secret)

Empty The Default Username Section Of The Secret Data

func WithMissingConfig added in v0.21.0

func WithMissingConfig(secret *corev1.Secret)

Remove the Data From The Secret

func WithModifiedNamespace added in v0.21.0

func WithModifiedNamespace(secret *corev1.Secret)

Modify The Default Namespace Section Of The Secret Data

func WithModifiedPassword added in v0.21.0

func WithModifiedPassword(secret *corev1.Secret)

Modify The Default Password Section Of The Secret Data

func WithModifiedSaramaAdmin

func WithModifiedSaramaAdmin(configMap *corev1.ConfigMap)

Modify The Default "Admin" Section Of The Sarama Config YAML

func WithModifiedSaramaConsumer

func WithModifiedSaramaConsumer(configMap *corev1.ConfigMap)

Modify The Default "Consumer" Section Of The Sarama Config YAML

func WithModifiedSaramaMetadata

func WithModifiedSaramaMetadata(configMap *corev1.ConfigMap)

Modify The Default "Net" Section Of The Sarama Config YAML

func WithModifiedSaramaNet

func WithModifiedSaramaNet(configMap *corev1.ConfigMap)

Modify The Default "Net" Section Of The Sarama Config YAML

func WithModifiedSaramaProducer

func WithModifiedSaramaProducer(configMap *corev1.ConfigMap)

Modify The Default "Producer" Section Of The Sarama Config YAML

func WithModifiedSaslType added in v0.21.0

func WithModifiedSaslType(secret *corev1.Secret)

Modify The Default SaslType Section Of The Secret Data

func WithModifiedUsername added in v0.21.0

func WithModifiedUsername(secret *corev1.Secret)

Modify The Default Username Section Of The Secret Data

func WithoutEventingKafkaConfiguration

func WithoutEventingKafkaConfiguration(configMap *corev1.ConfigMap)

Remove The Entire Eventing-Kafka Configuration

Types

type KafkaConfigMapOption

type KafkaConfigMapOption func(configMap *corev1.ConfigMap)

KafkaConfigMapOption Enables Customization Of An Eventing-Kafka ConfigMap

type KafkaSecretOption added in v0.21.0

type KafkaSecretOption func(secret *corev1.Secret)

KafkaConfigMapOption Enables Customization Of An Eventing-Kafka Secret

Jump to

Keyboard shortcuts

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