configgenerator

package
v0.69.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const CustomConfigBlockDivider = "#________******kubedb.com/inline-config******________#"

Variables

This section is empty.

Functions

func BuildSetGlobal

func BuildSetGlobal(sources ...map[string]string) (string, error)

BuildSetGlobal turns MySQL/MariaDB cnf files into one atomic "SET GLOBAL k=v, ..." statement. Sources are applied in order, so later ones win. It returns "" when there are no variables. A bare flag (no "=") cannot be set live, so it is an error.

func ConvertMapInToString

func ConvertMapInToString(config *orderedmap.OrderedMap) string

func ConvertStringInToMap

func ConvertStringInToMap(configString string, separators []string) (configData *orderedmap.OrderedMap)

func GetMergedConfig added in v0.60.0

func GetMergedConfig(currentConfig, reqConfig map[string]string) (map[string]string, error)

GetMergedConfig func return new config map where the current config and requested config are merged

func MergeAndOverWriteMap

func MergeAndOverWriteMap(config *orderedmap.OrderedMap, incomingConfig *orderedmap.OrderedMap) *orderedmap.OrderedMap

Types

type CustomConfigGenerator

type CustomConfigGenerator struct {
	CurrentConfig      string   // current config string
	RequestedConfig    string   // the requested change that comes from inline custom config
	ConfigBlockDivider string   // This is the divider  String between default custom config and inline config
	KeyValueSeparators []string // KeyValueSeparators is the array with which character a key and value can be separated. for example: a=b. here key `a` and value `b` Separator is '='. This array must need to have one or more value
}

func (*CustomConfigGenerator) GetMergedConfigString

func (generator *CustomConfigGenerator) GetMergedConfigString() (string, error)

GetMergedConfigString func return new config string where the current config string and requested config strings are merged

func (*CustomConfigGenerator) GetMergedConfigStringWithoutPreviousConfig added in v0.60.0

func (generator *CustomConfigGenerator) GetMergedConfigStringWithoutPreviousConfig() (string, error)

GetMergedConfigStringWithoutPrevConfig func return new config string where the current config string and requested config strings are merged without keeping previous config sample.

type ValueGenerator

type ValueGenerator struct {
	Value     string
	Separator string
}

Jump to

Keyboard shortcuts

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