Documentation ¶
Index ¶
- func FindOverrideStringValue(overrides Map, flatName string) (string, bool)
- func FindOverrideValue(overrides Map, flatName string) interface{}
- func FlattenMap(oMap Map) map[string]string
- func MergeMaps(baseMap, overridesMap Map)
- func ToYaml(oMap Map) (string, error)
- type ClusterStaticFile
- type LocalStaticFile
- type Map
- type OverrideData
- type Provider
- type StaticFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindOverrideStringValue ¶
FindOverrideStringValue looks for a string value assigned to the provided flat key.
func FindOverrideValue ¶
FindOverrideValue looks for a value assigned to the provided flat key.
func FlattenMap ¶
FlattenMap flattens an Map into a map of aggregated keys and value (to entries like, for example: "istio.ingress.service.gateway: xyz")
func MergeMaps ¶
func MergeMaps(baseMap, overridesMap Map)
MergeMaps merges all values from overridesMap map into baseMap, adding and/or overwriting final keys (string values) if both maps contain such entries. baseMap WILL be modified during merge. overridesMap won't be modified by future merges, since a deep-copy of it's nested maps are used for merging such nested maps.
Types ¶
type ClusterStaticFile ¶
type ClusterStaticFile struct {
DirectoryPath *string
}
ClusterStaticFile struct defines static file overrides for cluster
func NewClusterStaticFile ¶
func NewClusterStaticFile(dirPath string) *ClusterStaticFile
NewClusterStaticFile function creates instance of ClusterStaticFile struct for cluster overrides
func (*ClusterStaticFile) GetOverrides ¶
func (clusterStaticFile *ClusterStaticFile) GetOverrides() (Map, error)
GetOverrides function reads cluster overrides file and returns its content
func (*ClusterStaticFile) HasOverrides ¶
func (clusterStaticFile *ClusterStaticFile) HasOverrides() bool
HasOverrides function returns boolean whether additional overrides are defined
type LocalStaticFile ¶
type LocalStaticFile struct{}
LocalStaticFile struct defines static file overrides for local
func NewLocalStaticFile ¶
func NewLocalStaticFile() *LocalStaticFile
NewLocalStaticFile function creates instance of LocalStaticFile struct for cluster overrides
func (*LocalStaticFile) GetOverrides ¶
func (localStaticFile *LocalStaticFile) GetOverrides() (Map, error)
GetOverrides .
func (*LocalStaticFile) HasOverrides ¶
func (localStaticFile *LocalStaticFile) HasOverrides() bool
HasOverrides .
type Map ¶
type Map map[string]interface{}
Map is a map of overrides. Values in the map can be nested maps (of the same type) or strings
func UnflattenToMap ¶
UnflattenToMap converts external "flat" overrides into Map. Opposite of FlattenMap function.
type OverrideData ¶
OverrideData exposes methods to fetch release-specific overrides
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements storage for all overrides
type StaticFile ¶
StaticFile interface defines contract for overrides file representation