configuration

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultSLISource

type DefaultSLISource struct {
	Prometheus PrometheusSLISource `json:"prometheus,omitempty"`
}

DefaultSLISource is a configuration object with the default endpoints.

type JSONLoader

type JSONLoader struct{}

JSONLoader knows how to load application configuration.

func (JSONLoader) LoadDefaultSLISource

func (j JSONLoader) LoadDefaultSLISource(_ context.Context, r io.Reader) (*DefaultSLISource, error)

LoadDefaultSLISource satisfies Loader interface by loading in JSON format.

type Loader

type Loader interface {
	// LoadDefaultSLISource will load the default sli source configuration .
	LoadDefaultSLISource(ctx context.Context, r io.Reader) (*DefaultSLISource, error)
}

Loader knows how to load configuration based on different formats. At this moment configuration is not versioned, the configuration is so simple that if it grows we could refactor and add version, in this case not versioned configuration could be loaded as v1.

type PrometheusSLISource

type PrometheusSLISource struct {
	Address string `json:"address,omitempty"`
}

PrometheusSLISource is the default prometheus source.

Jump to

Keyboard shortcuts

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