config

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2022 License: MIT Imports: 6 Imported by: 4

Documentation

Index

Constants

View Source
const (
	//APP NAME
	AppName = "Monitor Agent"
	//Usage
	Usage = "Agent Usage"
	//Author Nmae
	Author = "devlopers@LodaStack"
	//Email Address
	Email = "devlopers@lodastack.com"
)
View Source
const (
	//PID FILE
	PID = "/var/run/loda-agent.pid"
)

Variables

View Source
var (
	//Vresion Num
	Version = ""
	//Vresion Commit
	Commit = ""
	//Vresion Branch
	Branch = ""
	//Build Time
	BuildTime = ""
)
View Source
var (
	C = new(Config)
)

Functions

func ParseConfig

func ParseConfig(path string) error

Types

type Config

type Config struct {
	Agent  common.AgentConfig `toml:"agent" json:"agent"`
	Output outputs.Config     `toml:"output" json:"output"`
	Trace  trace.Config       `toml:"trace" json:"trace"`
	Member member.Config      `toml:"member" json:"member"`
	Log    LogConfig          `toml:"log" json:"log"`
}

func GetConfig

func GetConfig() *Config

type LogConfig

type LogConfig struct {
	Dir           string `toml:"logdir" json:"logdir"`
	Level         string `toml:"loglevel" json:"loglevel"`
	Logrotatenum  int    `toml:"logrotatenum" json:"logrotatenum"`
	Logrotatesize uint64 `toml:"logrotatesize" json:"logrotatesize"`
}

Jump to

Keyboard shortcuts

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