cconf

package
v6.0.0-ga.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const EVENT_EXAMPLE = `` /* 1429-byte string literal not displayed */

Variables

View Source
var Operations = Operation{}
View Source
var Plugins = []Plugin{
	{
		Id:       1,
		Category: "timeseries",
		Type:     "prometheus",
		TypeName: "Prometheus Like",
	},
	{
		Id:       2,
		Category: "logging",
		Type:     "elasticsearch",
		TypeName: "Elasticsearch",
	},
	{
		Id:       3,
		Category: "logging",
		Type:     "jaeger",
		TypeName: "Jaeger",
	},
}

Functions

func GetAllOps

func GetAllOps(ops []Ops) []string

func GetMetricDesc

func GetMetricDesc(lang, metric string) string

GetMetricDesc , if metric is not registered, empty string will be returned

func LoadMetricsYaml

func LoadMetricsYaml(metricsYamlFile string) error

func LoadOpsYaml

func LoadOpsYaml(opsYamlFile string) error

Types

type AnonymousAccess

type AnonymousAccess struct {
	PromQuerier bool
	AlertDetail bool
}

type Center

type Center struct {
	Plugins                []Plugin
	BasicAuth              gin.Accounts
	MetricsYamlFile        string
	OpsYamlFile            string
	BuiltinIntegrationsDir string
	I18NHeaderKey          string
	MetricDesc             MetricDescType
	TargetMetrics          map[string]string
	AnonymousAccess        AnonymousAccess
}

func (*Center) PreCheck

func (c *Center) PreCheck()

type MetricDescType

type MetricDescType struct {
	CommonDesc map[string]string `yaml:",inline" json:"common"`
	Zh         map[string]string `yaml:"zh" json:"zh"`
	En         map[string]string `yaml:"en" json:"en"`
}

metricDesc , As load map happens before read map, there is no necessary to use concurrent map for metric desc store

var MetricDesc MetricDescType

type Operation

type Operation struct {
	Ops []Ops `yaml:"ops"`
}

type Ops

type Ops struct {
	Name  string   `yaml:"name" json:"name"`
	Cname string   `yaml:"cname" json:"cname"`
	Ops   []string `yaml:"ops" json:"ops"`
}

type Plugin

type Plugin struct {
	Id       int64  `json:"id"`
	Category string `json:"category"`
	Type     string `json:"plugin_type"`
	TypeName string `json:"plugin_type_name"`
}

Jump to

Keyboard shortcuts

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