config

package
v5.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: Apache-2.0 Imports: 16 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 MustLoad

func MustLoad(fpaths ...string)

Types

type AnonymousAccess

type AnonymousAccess struct {
	PromQuerier bool
	AlertDetail bool
}

type Config

type Config struct {
	RunMode         string
	I18N            string
	AdminRole       string
	MetricsYamlFile string
	ContactKeys     []ContactKey
	NotifyChannels  []string
	Log             logx.Config
	HTTP            httpx.Config
	JWTAuth         JWTAuth
	BasicAuth       gin.Accounts
	AnonymousAccess AnonymousAccess
	LDAP            ldapx.LdapSection
	Redis           storage.RedisConfig
	Gorm            storage.Gorm
	MySQL           storage.MySQL
	Postgres        storage.Postgres
	Clusters        []prom.Options
	Ibex            Ibex
}

func (*Config) IsDebugMode

func (c *Config) IsDebugMode() bool

type ContactKey

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

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
}

Jump to

Keyboard shortcuts

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