kafkatopic

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Overview

Example (Full)
images := map[string]string{}
cfg := map[string]interface{}{
	"name": "foo",
}

WithClusterName("other-cluster")(cfg)
WithClusterNamespace("here")(cfg)
WithPartitions("100")(cfg)

files, err := manifest.ExecuteLocalYAML(images, cfg)
if err != nil {
	panic(err)
}

manifest.OutputYAML(os.Stdout, files)
Output:

apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaTopic
metadata:
  name: foo
  namespace: here
  labels:
    strimzi.io/cluster: other-cluster
spec:
  partitions: 100
  replicas: 1
Example (Min)
images := map[string]string{}
cfg := map[string]interface{}{
	"name":             "foo",
	"partitions":       10,
	"clusterName":      "my-cluster",
	"clusterNamespace": "there",
}

files, err := manifest.ExecuteYAML(yaml, images, cfg)
if err != nil {
	panic(err)
}

manifest.OutputYAML(os.Stdout, files)
Output:

apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaTopic
metadata:
  name: foo
  namespace: there
  labels:
    strimzi.io/cluster: my-cluster
spec:
  partitions: 10
  replicas: 1

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func GVR

func Install

func Install(name string, opts ...manifest.CfgFn) feature.StepFn

Install will create a Kafka Topic via the Strimzi topic CRD,, augmented with the config fn options.

func IsReady

func IsReady(name string, timings ...time.Duration) feature.StepFn

IsReady tests to see if a KafkaTopic becomes ready within the time given.

func WithClusterName

func WithClusterName(name string) manifest.CfgFn

WithClusterName overrides the Kafka cluster names where to create the topic (default: my-cluster)

func WithClusterNamespace

func WithClusterNamespace(namespace string) manifest.CfgFn

WithClusterNamespace overrides the Kafka cluster namespace where to create the topic (default: kafka)

func WithPartitions

func WithPartitions(partitions string) manifest.CfgFn

WithPartitions overrides the number of partitions (default: 10).

Types

This section is empty.

Jump to

Keyboard shortcuts

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