config

package
v0.0.0-...-8fecf22 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	EnpointLoadconfig = "/loadconfig"
	EnpointStop       = "/stop"
	EnpointHoldon     = "/holdon"
)

export http endpoints.

Variables

View Source
var BaseVersion = "0.1.0" // will be overwritten through ldflags at compile time

StatisticsConfigJson, AlarmConfigJson

View Source
var LoongcollectorGlobalConfig = newGlobalConfig()

LoongcollectorGlobalConfig is the singleton instance of GlobalConfig.

View Source
var UserAgent = fmt.Sprintf("ilogtail/%v (%v)", BaseVersion, runtime.GOOS) // set in global config

Functions

func GetRealConfigName

func GetRealConfigName(configName string) string

func SerizlizeLoadedConfig

func SerizlizeLoadedConfig(c []*LoadedConfig) []byte

Types

type GlobalConfig

type GlobalConfig struct {
	InputMaxFirstCollectDelayMs int // 10s by default, If InputMaxFirstCollectDelayMs is greater than interval, it will use interval instead.
	InputIntervalMs             int
	AggregatIntervalMs          int
	FlushIntervalMs             int
	DefaultLogQueueSize         int
	DefaultLogGroupQueueSize    int
	// Directory to store prometheus configuration file.
	LoongCollectorPrometheusAuthorizationPath string
	// Directory to store loongcollector data, such as checkpoint, etc.
	LoongCollectorConfDir string
	// Directory to store loongcollector log config.
	LoongCollectorLogConfDir string
	// Directory to store loongcollector log.
	LoongCollectorLogDir string
	// Directory to store loongcollector data.
	LoongCollectorDataDir string
	// Directory to store loongcollector debug data.
	LoongCollectorDebugDir string
	// Directory to store loongcollector third party data.
	LoongCollectorThirdPartyDir string
	// Log name of loongcollector plugin.
	LoongCollectorPluginLogName string
	// Tag of loongcollector version.
	LoongCollectorVersionTag string
	// Checkpoint dir name of loongcollector plugin.
	LoongCollectorGoCheckPointDir string
	// Checkpoint file name of loongcollector plugin.
	LoongCollectorGoCheckPointFile string
	// Network identification from loongcollector.
	HostIP       string
	Hostname     string
	DelayStopSec int

	EnableTimestampNanosecond bool
	UsingOldContentTag        bool
	EnableSlsMetricsFormat    bool
	EnableProcessorTag        bool

	PipelineMetaTagKey     map[string]string
	AppendingAllEnvMetaTag bool
	AgentEnvMetaTagKey     map[string]string
}

GlobalConfig represents global configurations of plugin system.

type LoadedConfig

type LoadedConfig struct {
	Project     string `json:"project"`
	Logstore    string `json:"logstore"`
	ConfigName  string `json:"config_name"`
	LogstoreKey int64  `json:"logstore_key"`
	JSONStr     string `json:"json_str"`
}

LoadedConfig used to start logtail plugin sniffer.

func DeserializeLoadedConfig

func DeserializeLoadedConfig(cfg []byte) ([]*LoadedConfig, error)

Jump to

Keyboard shortcuts

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