g

package
v0.0.0-...-629276b Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2016 License: Apache-2.0 Imports: 6 Imported by: 18

Documentation

Index

Constants

View Source
const (
	COMMIT = "5c733f5"
)
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"`
	Event     string `json:"event"`
	Map       string `json:"map"`
	Geo       string `json:"geo"`
	Uplink    string `json:"uplink"`
	Query     string `json:"query"`
	Dashboard string `json:"dashboard"`
	Max       int    `json:"max"`
}

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"`
	Http    *HttpConfig    `json:"http"`
	Graph   *GraphConfig   `json:"graph"`
	Api     *ApiConfig     `json:"api"`
	Db      *DbConfig      `json:"db"`
	NqmLog  *NqmLogConfig  `json:nqmlog`
	Nqm     *NqmConfig     `json:"nqm"`
	Grpc    *GrpcConfig    `json:"grpc"`
	GinHttp *GinHttpConfig `json:"gin_http"`
	GraphDB *GraphDB       `json:"graphdb"`
}

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 HttpConfig

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

type NqmConfig

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

type NqmLogConfig

type NqmLogConfig struct {
	JsonrpcUrl string `json:"jsonrpcUrl"`
}

Jump to

Keyboard shortcuts

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