config

package
v0.0.0-...-77199df Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetDefault

func SetDefault(ptr interface{}) error

Set initializes members in a struct referenced by a pointer. Maps and slices are initialized by `make` and other primitive types are set with default values. `ptr` should be a struct pointer

Types

type AutoCustomTags

type AutoCustomTags struct {
	TagName     string   `default:"" yaml:"tag-name"`
	TagFields   []string `yaml:"tag-fields" binding:"omitempty,dive"`
	DisplayName string   `default:"" yaml:"display_name"`
	Description string   `default:"" yaml:"description"`
}

type Clickhouse

type Clickhouse struct {
	User           string `default:"default" yaml:"user-name"`
	Password       string `default:"" yaml:"user-password"`
	Host           string `default:"clickhouse" yaml:"host"`
	Port           int    `default:"9000" yaml:"port"`
	Timeout        int    `default:"60" yaml:"timeout"`
	ConnectTimeout int    `default:"2" yaml:"connect-timeout"`
	MaxConnection  int    `default:"20" yaml:"max-connection"`
}

type Config

type Config struct {
	QuerierConfig    QuerierConfig    `yaml:"querier"`
	TraceIdWithIndex TraceIdWithIndex `yaml:"trace-id-with-index"`
}

func DefaultConfig

func DefaultConfig() *Config

func (*Config) Load

func (c *Config) Load(path string)

func (*Config) Validate

func (c *Config) Validate() error

type DeepflowApp

type DeepflowApp struct {
	Host string `default:"deepflow-app" yaml:"host"`
	Port string `default:"20418" yaml:"port"`
}

type Location

type Location struct {
	Start  int    `yaml:"start"`
	Length int    `yaml:"length"`
	Format string `yaml:"format"`
}

type QuerierConfig

type QuerierConfig struct {
	LogFile                         string                        `default:"/var/log/querier.log" yaml:"log-file"`
	LogLevel                        string                        `default:"info" yaml:"log-level"`
	ListenPort                      int                           `default:"20416" yaml:"listen-port"`
	Clickhouse                      Clickhouse                    `yaml:clickhouse`
	Profile                         profile.ProfileConfig         `yaml:profile`
	DeepflowApp                     DeepflowApp                   `yaml:"deepflow-app"`
	Prometheus                      prometheus.Prometheus         `yaml:"prometheus"`
	ExternalAPM                     []tracing_adapter.ExternalAPM `yaml:"external-apm"`
	Language                        string                        `default:"en" yaml:"language"`
	OtelEndpoint                    string                        `default:"http://deepflow-agent/api/v1/otel/trace" yaml:"otel-endpoint"`
	Limit                           string                        `default:"10000" yaml:"limit"`
	TimeFillLimit                   int                           `default:"20" yaml:"time-fill-limit"`
	PrometheusCacheUpdateInterval   int                           `default:"60" yaml:"prometheus-cache-update-interval"`
	MaxCacheableEntrySize           int                           `default:"1000" yaml:"max-cacheable-entry-size"`
	MaxPrometheusIdSubqueryLruEntry int                           `default:"8000" yaml:"max-prometheus-id-subquery-lru-entry"`
	PrometheusIdSubqueryLruTimeout  int                           `default:"60" yaml:"prometheus-id-subquery-lru-timeout"`
	AutoCustomTags                  []AutoCustomTags              `yaml:"auto-custom-tags" binding:"omitempty,dive"`
}
var Cfg *QuerierConfig

type Setter

type Setter interface {
	SetDefaults()
}

Setter is an interface for setting default values

type TraceIdWithIndex

type TraceIdWithIndex struct {
	Enabled               bool     `yaml:"enabled"`
	Type                  string   `yaml:"type"`
	IncrementalIdLocation Location `yaml:"incremental-id-location"`
}
var TraceConfig *TraceIdWithIndex

Jump to

Keyboard shortcuts

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