g

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Root string
	Cfg  Config
	//CLock	       sync.Mutex
	SelfCfg        NetworkMember
	AlertStatus    map[string]bool
	AuthUserIpMap  map[string]bool
	AuthAgentIpMap map[string]bool
	ToolLimit      map[string]int
	Db             *sql.DB
	DLock          sync.Mutex
)

Functions

func GetRoot

func GetRoot() string

func IsExist added in v0.5.0

func IsExist(fp string) bool

func ParseConfig

func ParseConfig(ver string)

func SaveConfig added in v0.5.0

func SaveConfig() error

Types

type AlertLog added in v0.8.0

type AlertLog struct {
	Logtime    string
	Targetip   string
	Targetname string
	Tracert    string
	Fromip     string
	Fromname   string
}

type ChinaMp added in v0.8.0

type ChinaMp struct {
	Text     string              `json:"text"`
	Subtext  string              `json:"subtext"`
	Avgdelay map[string][]MapVal `json:"avgdelay"`
}

type Config

type Config struct {
	Ver        string
	Port       int
	Name       string
	Addr       string
	Mode       map[string]string
	Base       map[string]int
	Topology   map[string]string
	Alert      map[string]string
	Network    map[string]NetworkMember
	Chinamap   map[string]map[string][]string
	Toollimit  int
	Authiplist string
	Password   string
}

func ReadConfig

func ReadConfig(filename string) Config

func SaveCloudConfig added in v0.8.0

func SaveCloudConfig(url string) (Config, error)

type MapVal added in v0.8.0

type MapVal struct {
	Value float64 `json:"value"`
	Name  string  `json:"name"`
}

type NetworkMember added in v0.8.0

type NetworkMember struct {
	Name      string
	Addr      string
	Smartping bool
	Ping      []string
	//Tools map[string][]string
	Topology []map[string]string
}

type PingLog added in v0.8.0

type PingLog struct {
	Logtime  string
	Maxdelay string
	Mindelay string
	Avgdelay string
	Losspk   string
}

type PingSt added in v0.4.0

type PingSt struct {
	SendPk   int
	RevcPk   int
	LossPk   int
	MinDelay float64
	AvgDelay float64
	MaxDelay float64
}

Ping Struct

type PingStMini added in v0.8.0

type PingStMini struct {
	Lastcheck []string `json:"lastcheck"`
	LossPk    []string `json:"losspk"`
	AvgDelay  []string `json:"avgdelay"`
}

Ping mini graph Struct

type ToolsRes added in v0.8.0

type ToolsRes struct {
	Status string `json:"status"`
	Error  string `json:"error"`
	Ip     string `json:"ip"`
	Ping   PingSt `json:"ping"`
}

Jump to

Keyboard shortcuts

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