config

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: BSD-3-Clause Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	WebAddr        string
	ManagementAddr string
	Environment    string
	OtelUrl        string
	Instance       string
	PrintVersion   bool
	Logger         zap.Config
	Connectors     []connectors.Connector
	WhereTemplate  *template.Template
	Interval       time.Duration
	Dashboards     map[string]*Dashboard
	Style          string
}

func NewConfiguration

func NewConfiguration() (config *Config, err error)

type Dashboard

type Dashboard struct {
	Name   string
	Mode   DashboardMode
	Filter []Rule
}

type DashboardMode

type DashboardMode uint8
const (
	// Excluding is the default mode, this mirrors a mindset of "everything
	// new has to be looked at, at least once".
	// `0` is the empty value, so in case it is used in a context with
	// uninitialized data, it will still be the default.
	Excluding DashboardMode = iota
	Including
)

func (DashboardMode) MarshalTOML

func (s DashboardMode) MarshalTOML() ([]byte, error)

func (DashboardMode) String

func (s DashboardMode) String() string

func (*DashboardMode) UnmarshalTOML

func (s *DashboardMode) UnmarshalTOML(data interface{}) (err error)

type Rule

type Rule struct {
	Description string
	What        RuleMatcher
	When        RuleMatcher
	Labels      map[string]RuleMatcher
}

type RuleMatcher

type RuleMatcher interface {
	MatchString(s string) bool
}

func ParseRuleMatcher

func ParseRuleMatcher(value string) RuleMatcher

Jump to

Keyboard shortcuts

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