g

package
v0.0.0-...-40400fb Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2015 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VERSION      = "0.0.11"
	GAUGE        = "GAUGE"
	COUNTER      = "COUNTER"
	DERIVE       = "DERIVE"
	DEFAULT_STEP = 60
	MIN_STEP     = 30
)

changelog: 0.0.1: init project 0.0.4: bugfix: set replicas before add node 0.0.8: change receiver, mv proc cron to proc pkg, add readme, add gitversion, add config reload, add trace tools 0.0.9: fix bugs of conn pool(use transfer's private conn pool, named & minimum) 0.0.10: use more efficient proc & sema, rm conn_pool status log 0.0.11: fix bug: all graphs' traffic delined when one graph broken down, modify retry interval

View Source
const (
	COMMIT = "95274d9"
)

Variables

View Source
var (
	ConfigFile string
)

Functions

func ParseConfig

func ParseConfig(cfg string)

Types

type GlobalConfig

type GlobalConfig struct {
	Debug  bool          `json:"debug"`
	Http   *HttpConfig   `json:"http"`
	Rpc    *RpcConfig    `json:"rpc"`
	Socket *SocketConfig `json:"socket"`
	Judge  *JudgeConfig  `json:"judge"`
	Graph  *GraphConfig  `json:"graph"`
}

func Config

func Config() *GlobalConfig

type GraphConfig

type GraphConfig struct {
	Enabled          bool              `json:"enabled"`
	Batch            int               `json:"batch"`
	ConnTimeout      int               `json:"connTimeout"`
	CallTimeout      int               `json:"callTimeout"`
	PingMethod       string            `json:"pingMethod"`
	MaxConns         int               `json:"maxConns"`
	MaxIdle          int               `json:"maxIdle"`
	Replicas         int               `json:"replicas"`
	Migrating        bool              `json:"migrating"`
	Cluster          map[string]string `json:"cluster"`
	ClusterMigrating map[string]string `json:"clusterMigrating"`
}

type HttpConfig

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

type JudgeConfig

type JudgeConfig struct {
	Enabled     bool              `json:"enabled"`
	Batch       int               `json:"batch"`
	ConnTimeout int               `json:"connTimeout"`
	CallTimeout int               `json:"callTimeout"`
	PingMethod  string            `json:"pingMethod"`
	MaxConns    int               `json:"maxConns"`
	MaxIdle     int               `json:"maxIdle"`
	Replicas    int               `json:"replicas"`
	Cluster     map[string]string `json:"cluster"`
}

type RpcConfig

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

type SocketConfig

type SocketConfig struct {
	Enabled bool   `json:"enabled"`
	Listen  string `json:"listen"`
	Timeout int    `json:"timeout"`
}

Jump to

Keyboard shortcuts

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