Documentation
¶
Index ¶
- Constants
- func BuildSetGlobal(sources ...map[string]string) (string, error)
- func ConvertMapInToString(config *orderedmap.OrderedMap) string
- func ConvertStringInToMap(configString string, separators []string) (configData *orderedmap.OrderedMap)
- func GetMergedConfig(currentConfig, reqConfig map[string]string) (map[string]string, error)
- func MergeAndOverWriteMap(config *orderedmap.OrderedMap, incomingConfig *orderedmap.OrderedMap) *orderedmap.OrderedMap
- type CustomConfigGenerator
- type ValueGenerator
Constants ¶
View Source
const CustomConfigBlockDivider = "#________******kubedb.com/inline-config******________#"
Variables ¶
This section is empty.
Functions ¶
func BuildSetGlobal ¶
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
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 ¶
Click to show internal directories.
Click to hide internal directories.