config

package
v0.34.3 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 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"`

	// ContractConfigMapName is the name of the configmap that holds the contract between the control plane
	// and the data plane.
	ContractConfigMapName string `required:"true" split_words:"true"` // example: kafka-broker-brokers-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"`
	ContractConfigMapFormat 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