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: 5 Imported by: 12

Documentation

Index

Constants

View Source
const (
	COMMIT = "b4d6264"
)
View Source
const (
	VERSION = "0.0.10"
)

Variables

View Source
var (
	ConfigFile string
)

Functions

func ParseConfig

func ParseConfig(cfg string)

Types

type AgentConfig

type AgentConfig struct {
	Enable  bool           `json:"enable"`
	Dsn     string         `json:"dsn"`
	MaxIdle int32          `json:"maxIdle"`
	Plugin  *PluginConfig  `json:"plugin"`
	Cleaner *CleanerConfig `json:"cleaner"`
}

type CleanerConfig

type CleanerConfig struct {
	Interval int32 `json:"interval"`
}

type CollectorConfig

type CollectorConfig struct {
	Enable    bool     `json:"enable"`
	DestUrl   string   `json:"destUrl"`
	SrcUrlFmt string   `json:"srcUrlFmt"`
	Cluster   []string `json:"cluster"`
}

type GlobalConfig

type GlobalConfig struct {
	Debug     bool             `json:"debug"`
	Http      *HttpConfig      `json:"http"`
	Index     *IndexConfig     `json:"index"`
	Collector *CollectorConfig `json:"collector"`
	Agent     *AgentConfig     `json:"agent"`
}

func Config

func Config() *GlobalConfig

type HttpConfig

type HttpConfig struct {
	Enable bool   `json:"enable"`
	Listen string `json:"listen"`
}

type IndexConfig

type IndexConfig struct {
	Enable  bool              `json:"enable"`
	Dsn     string            `json:"dsn"`
	MaxIdle int               `json:"maxIdle"`
	Cluster map[string]string `json:"cluster"`
}

type PluginConfig

type PluginConfig struct {
	ApiUrlFmt      string `json:"apiUrlFmt"`
	Interval       int32  `json:"interval"`
	Concurrent     int32  `json:"concurrent"`
	ConnectTimeout int32  `json:"connectTimeout"`
	RequestTimeout int32  `json:"requestTimeout"`
}

Jump to

Keyboard shortcuts

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