config

package
v5.10.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	C = new(Config)
)

Functions

func GetOutboundIP

func GetOutboundIP() net.IP

Get preferred outbound ip of this machine

func MustLoad

func MustLoad(fpaths ...string)

Types

type Alerting

type Alerting struct {
	TemplatesDir          string
	NotifyConcurrency     int
	NotifyBuiltinChannels []string
	CallScript            CallScript
	CallPlugin            CallPlugin
	RedisPub              RedisPub
	Webhook               Webhook
}

type CallPlugin added in v5.5.0

type CallPlugin struct {
	Enable     bool
	PluginPath string
	Caller     string
}

type CallScript added in v5.4.0

type CallScript struct {
	Enable     bool
	ScriptPath string
}

type Config

type Config struct {
	RunMode            string
	ClusterName        string
	BusiGroupLabelKey  string
	AnomalyDataApi     []string
	EngineDelay        int64
	DisableUsageReport bool
	Log                logx.Config
	HTTP               httpx.Config
	BasicAuth          gin.Accounts
	SMTP               SMTPConfig
	Heartbeat          HeartbeatConfig
	Alerting           Alerting
	NoData             NoData
	Redis              storage.RedisConfig
	DB                 ormx.DBConfig
	WriterOpt          WriterGlobalOpt
	Writers            []WriterOptions
	Reader             ReaderOptions
	Ibex               Ibex
}

func (*Config) IsDebugMode

func (c *Config) IsDebugMode() bool

type HeartbeatConfig

type HeartbeatConfig struct {
	IP       string
	Interval int64
	Endpoint string
}

type Ibex

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

type NoData

type NoData struct {
	Metric   string
	Interval int64
}

type ReaderOptions added in v5.9.2

type ReaderOptions struct {
	Url           string
	BasicAuthUser string
	BasicAuthPass string

	Timeout               int64
	DialTimeout           int64
	TLSHandshakeTimeout   int64
	ExpectContinueTimeout int64
	IdleConnTimeout       int64
	KeepAlive             int64

	MaxConnsPerHost     int
	MaxIdleConns        int
	MaxIdleConnsPerHost int

	Headers []string
}

type RedisPub

type RedisPub struct {
	Enable        bool
	ChannelPrefix string
	ChannelKey    string
}

type SMTPConfig added in v5.4.0

type SMTPConfig struct {
	Host               string
	Port               int
	User               string
	Pass               string
	From               string
	InsecureSkipVerify bool
	Batch              int
}

type Webhook added in v5.4.0

type Webhook struct {
	Enable          bool
	Url             string
	BasicAuthUser   string
	BasicAuthPass   string
	Timeout         string
	TimeoutDuration time.Duration
	Headers         []string
}

type WriterGlobalOpt added in v5.9.2

type WriterGlobalOpt struct {
	QueueCount   int
	QueueMaxSize int
	QueuePopSize int
}

type WriterOptions added in v5.9.2

type WriterOptions struct {
	Url           string
	BasicAuthUser string
	BasicAuthPass string

	Timeout               int64
	DialTimeout           int64
	TLSHandshakeTimeout   int64
	ExpectContinueTimeout int64
	IdleConnTimeout       int64
	KeepAlive             int64

	MaxConnsPerHost     int
	MaxIdleConns        int
	MaxIdleConnsPerHost int

	Headers []string
}

Jump to

Keyboard shortcuts

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