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.
Click to show internal directories.
Click to hide internal directories.