g

package
v3.14.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2017 License: Apache-2.0, Apache-2.0 Imports: 8 Imported by: 30

Documentation

Index

Constants

View Source
const (
	VERSION = "1.4.3"
)

Variables

View Source
var (
	ConfigFile string
)

Functions

func ParseConfig

func ParseConfig(cfg string)

func SetConfig

func SetConfig(newConfig *GlobalConfig)

Sets the config directly

Types

type ApiConfig

type ApiConfig struct {
	Name      string `json:"name"`
	Token     string `json:"token"`
	Contact   string `json:"contact"`
	Dashboard string `json:"dashboard"`
	Event     string `json:"event"`
	Geo       string `json:"geo"`
	Map       string `json:"map"`
	Max       int    `json:"max"`
	Platform  string `json:"platform"`
	Query     string `json:"query"`
	Uplink    string `json:"uplink"`
}

type ContactsConfig

type ContactsConfig struct {
	Enabled  bool `json:"enabled"`
	Interval int  `json:"interval"`
}

type DbConfig

type DbConfig struct {
	Addr string `json:"addr"`
	Idle int    `json:"idle"`
	Max  int    `json:"max"`
}

type GinHttpConfig

type GinHttpConfig struct {
	Enabled bool   `json:"enabled"`
	Listen  string `json:"listen"`
}

type GlobalConfig

type GlobalConfig struct {
	Debug      bool            `json:"debug"`
	RootDir    string          `json:"root_dir"`
	Http       *HttpConfig     `json:"http"`
	Contacts   *ContactsConfig `json:"contacts"`
	Hosts      *HostsConfig    `json:"hosts"`
	Deviations *NetConfig      `json:"deviations"`
	Net        *NetConfig      `json:"net"`
	Speed      *NetConfig      `json:"speed"`
	Api        *ApiConfig      `json:"api"`
	Graph      *GraphConfig    `json:"graph"`
	Db         *DbConfig       `json:"db"`
	ApolloDB   *DbConfig       `json:"apollodb"`
	BossDB     *DbConfig       `json:"bossdb"`
	Local      string          `json:"local"`
	NqmLog     *NqmLogConfig   `json:"nqmlog"`
	Nqm        *NqmConfig      `json:"nqm"`
	Grpc       *GrpcConfig     `json:"grpc"`
	GinHttp    *GinHttpConfig  `json:"gin_http"`
	GraphDB    *GraphDB        `json:"graphdb"`
	Fe         string          `json:"fe"`
}

func Config

func Config() *GlobalConfig

Gets the configuration

type GraphConfig

type GraphConfig struct {
	ConnTimeout int32             `json:"connTimeout"`
	CallTimeout int32             `json:"callTimeout"`
	MaxConns    int32             `json:"maxConns"`
	MaxIdle     int32             `json:"maxIdle"`
	Replicas    int32             `json:"replicas"`
	Cluster     map[string]string `json:"cluster"`
}

type GraphDB

type GraphDB struct {
	Addr  string `json:"addr"`
	Idle  int    `json:"idle"`
	Max   int    `json:"max"`
	Limit int    `json:"limit"`
}

type GrpcConfig

type GrpcConfig struct {
	Enabled bool `json:"enabled"`
	Port    int  `json:"port"`
}

type HostsConfig

type HostsConfig struct {
	Enabled  bool `json:"enabled"`
	Interval int  `json:"interval"`
}

type HttpConfig

type HttpConfig struct {
	Enabled bool   `json:"enabled"`
	Listen  string `json:"listen"`
}

type NetConfig

type NetConfig struct {
	Enabled bool   `json:"enabled"`
	Time    string `json:"time"`
}

type NqmConfig

type NqmConfig struct {
	Addr string `json:"addr"`
	Idle int    `json:"idle"`
	Max  int    `json:"max"`
}

type NqmLogConfig

type NqmLogConfig struct {
	ServiceUrl string `json:"serviceUrl"`
}

Jump to

Keyboard shortcuts

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