config

package
v2.0.17 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 15 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const DefaultShutdownTimeout = 5 * time.Second

DefaultShutdownTimeout 优雅关闭的默认超时时间。 未配置 go.application.shutdownTimeout 或配置值非法(<=0)时使用该值, 与升级前硬编码的 5 秒保持一致,确保向后兼容。

Variables

View Source
var Config = &config{}

Functions

This section is empty.

Types

type LogOutput added in v2.0.11

type LogOutput struct {
	Target  string   `json:"target"`
	Format  string   `json:"format"`
	Fields  []string `json:"fields"`
	LogText string   `json:"logtext"`
	File    string   `json:"file"`
}

LogOutput configures one application log destination. External targets name a registered RecordHandler.

type RegistryConfig added in v2.0.13

type RegistryConfig struct {
	Name        string `json:"name" bson:"name"`
	Type        string `json:"type" bson:"type"`
	Prefix      string `json:"prefix" bson:"prefix"`
	Namespace   string `json:"namespace" bson:"namespace"`
	Group       string `json:"group" bson:"group"`
	ClusterName string `json:"clusterName" bson:"clusterName"`
}

type VictoriaLogsConfig added in v2.0.12

type VictoriaLogsConfig struct {
	URL      string `json:"url"`
	APIToken string `json:"api_token" koanf:"api_token"`
	APICert  string `json:"api_crt" koanf:"api_crt"`
	Request  bool   `json:"request"`
	Client   bool   `json:"client"`
	Timeout  int    `json:"timeout"`
}

VictoriaLogsConfig configures the built-in HTTPS collector.

Jump to

Keyboard shortcuts

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