config

package
v0.0.0-...-68fa65b Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 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 LogtailGlobalConfig = newGlobalConfig()

LogtailGlobalConfig 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 {
	InputIntervalMs          int
	AggregatIntervalMs       int
	FlushIntervalMs          int
	DefaultLogQueueSize      int
	DefaultLogGroupQueueSize int
	Tags                     map[string]string
	// Directory to store logtail data, such as checkpoint, etc.
	LogtailSysConfDir string
	// Network identification from logtail.
	HostIP       string
	Hostname     string
	AlwaysOnline bool
	DelayStopSec int

	EnableTimestampNanosecond      bool
	UsingOldContentTag             bool
	EnableContainerdUpperDirDetect bool
	EnableSlsMetricsFormat         bool
}

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