config

package
v0.33.1 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Env

type Env struct {
	// DataPlaneConfigMapNamespace is the namespace of the configmap that holds the contract between the control plane
	// and the data plane. Might be ignored in some cases such as the configmap is expected to be in the resource
	// namespace
	DataPlaneConfigMapNamespace string `required:"true" split_words:"true"`

	// DataPlaneConfigMapName is the name of the configmap that holds the contract between the control plane
	// and the data plane.
	DataPlaneConfigMapName string `required:"true" split_words:"true"` // example: kafka-broker-triggers

	// GeneralConfigMapName is the name of the configmap that holds configuration that affects the control plane
	// and the data plane. For example, Kafka bootstrap server information could be in here for broker configuration.
	GeneralConfigMapName string `required:"true" split_words:"true"` // example: kafka-broker-config

	IngressName           string `required:"true" split_words:"true"` // example: kafka-broker-ingress
	IngressPodPort        string `required:"false" split_words:"true"`
	SystemNamespace       string `required:"true" split_words:"true"`
	DataPlaneConfigFormat string `required:"true" split_words:"true"`
	DefaultBackoffDelayMs uint64 `required:"false" split_words:"true"`
}

func GetEnvConfig

func GetEnvConfig(prefix string, validations ...ValidationOption) (*Env, error)

func (*Env) DataPlaneConfigMapAsString

func (c *Env) DataPlaneConfigMapAsString() string

type ValidationOption added in v0.19.0

type ValidationOption func(env Env) error

ValidationOption represents a function to validate the Env configurations.

Jump to

Keyboard shortcuts

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