config

package
v5.9.5 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	C = new(Config)
)
View Source
var Metrics = cmap.New()

Functions

func LabelAndKeyHasKey added in v5.4.0

func LabelAndKeyHasKey(keys []LabelAndKey, key string) bool

func MustLoad

func MustLoad(fpaths ...string)

Types

type AnonymousAccess

type AnonymousAccess struct {
	PromQuerier bool
	AlertDetail bool
}

type ClusterOptions added in v5.9.2

type ClusterOptions struct {
	Name string
	Prom string

	BasicAuthUser string
	BasicAuthPass string

	Headers []string

	Timeout     int64
	DialTimeout int64
	KeepAlive   int64

	MaxIdleConnsPerHost int
}

type Config

type Config struct {
	RunMode              string
	I18N                 string
	AdminRole            string
	MetricsYamlFile      string
	BuiltinAlertsDir     string
	BuiltinDashboardsDir string
	ClustersFrom         string
	ClustersFromAPIs     []string
	ContactKeys          []LabelAndKey
	NotifyChannels       []LabelAndKey
	Log                  logx.Config
	HTTP                 httpx.Config
	JWTAuth              JWTAuth
	BasicAuth            gin.Accounts
	AnonymousAccess      AnonymousAccess
	LDAP                 ldapx.LdapSection
	Redis                storage.RedisConfig
	DB                   ormx.DBConfig
	Clusters             []ClusterOptions
	Ibex                 Ibex
	OIDC                 oidcc.Config
}

func (*Config) IsDebugMode

func (c *Config) IsDebugMode() bool

type Ibex

type Ibex struct {
	Address       string
	BasicAuthUser string
	BasicAuthPass string
	Timeout       int64
}

type JWTAuth

type JWTAuth struct {
	SigningKey     string
	AccessExpired  int64
	RefreshExpired int64
	RedisKeyPrefix string
}

type LabelAndKey added in v5.4.0

type LabelAndKey struct {
	Label string `json:"label"`
	Key   string `json:"key"`
}

Jump to

Keyboard shortcuts

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