config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//APP NAME
	AppName = "Alarm Adapter"
	//Usage
	Usage = "Alarm Adapter Usage"
	//Vresion Num
	Version = "0.0.1"
	//Author Nmae
	Author = "Devlopers LodaStack"
	//Email Address
	Email = "devlopers@lodastack.com"
)
View Source
const (
	//PID FILE
	PID = "/var/run/alarm-adapter.pid"
)

Variables

View Source
var (
	C = new(Config)
)

Functions

func ParseConfig

func ParseConfig(path string) error

Types

type Config

type Config struct {
	Main MainConfig `toml:"main"`
	Log  LogConfig  `toml:"log"`
}

func GetConfig

func GetConfig() *Config

type LogConfig

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

type MainConfig

type MainConfig struct {
	AlarmNS      string `toml:"alarmNS"`
	AlarmAddr    string `toml:"alarmAddr"`
	RegistryAddr string `toml:"registryAddr"`
}

Jump to

Keyboard shortcuts

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