aggregator

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Namespace = "namespace"
)

Variables

This section is empty.

Functions

func NewAggregator

func NewAggregator(k8sclient kubernetes.Interface, namespace, configMap string, opts ...Option) *aggregator

NewAggregator returns an aggregator instance

Types

type GlobalConfig

type GlobalConfig struct {
	Configs []obj `json:"configs"`
}

GlobalConfig describe the global configuration in the centralized namespace

type Option

type Option func(*aggregator)

func WithAppConfigLabel

func WithAppConfigLabel(l string) Option

WithAppConfigLabel sets the config label in the application namespace.

func WithConfigMapKey

func WithConfigMapKey(k string) Option

WithConfigMapKey sets the key of the aggregated config map.

func WithInterval

func WithInterval(f time.Duration) Option

WithInterval sets the interval of each run of checking configurations.

func WithLogger

func WithLogger(l *zap.SugaredLogger) Option

WithLogger sets the logger to be used.

func WithSchemaFileDir

func WithSchemaFileDir(p string) Option

WithSchemaFileDir sets the dir of the json-schema file for validation.

Jump to

Keyboard shortcuts

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