testing

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	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

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

Create A New Eventing-Kafka Secret For Testing

func WithEmptyUsername

func WithEmptyUsername(secret *corev1.Secret)

Empty The Default Username Section Of The Secret Data

func WithMissingConfig

func WithMissingConfig(secret *corev1.Secret)

Remove the Data From The Secret

func WithModifiedNamespace

func WithModifiedNamespace(secret *corev1.Secret)

Modify The Default Namespace Section Of The Secret Data

func WithModifiedPassword

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

func WithModifiedSaslType(secret *corev1.Secret)

Modify The Default SaslType Section Of The Secret Data

func WithModifiedUsername

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

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