merger

package
v0.0.173 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeAndUpdate

func MergeAndUpdate(ctx context.Context, client mergeClient, mets *Metrics, list MergeList, skipValidate, confirm bool) (*configpb.Configuration, error)

MergeAndUpdate gathers configurations from each path and merges them. Puts the result at targetPath if confirm is true Will skip an input config if it is invalid and skipValidate is false Other problems are considered fatal and will return an error

Types

type MergeList

type MergeList struct {
	Target  string    `json:"Target"`
	Path    *gcs.Path `json:"-"`
	Sources []Source  `json:"Sources"`
}

MergeList is a list of config sources to merge together ParseAndCheck will construct this from a YAML document

func ParseAndCheck

func ParseAndCheck(data []byte) (list MergeList, err error)

ParseAndCheck parses and checks the configuration file for common errors

type Metrics added in v0.0.111

type Metrics struct {
	Update       metrics.Cyclic
	Fields       metrics.Int64
	LastModified metrics.Int64
}

Metrics holds metrics relevant to the config merger.

func CreateMetrics added in v0.0.111

func CreateMetrics(factory metrics.Factory) *Metrics

CreateMetrics creates metrics for the Config Merger

type Source

type Source struct {
	Name     string    `json:"Name"`
	Location string    `json:"Location"`
	Path     *gcs.Path `json:"-"`
	Contact  string    `json:"Contact,omitempty"`
}

Source represents a configuration source in cloud storage

Jump to

Keyboard shortcuts

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