Version: v0.0.0-...-9e2cc1d Latest Latest

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

Go to latest
Published: Dec 27, 2016 License: Apache-2.0 Imports: 13 Imported by: 9




View Source
const (
	VERSION          = "1.0.1"

changelog: 1.0.1


View Source
var (
	ConfigFile string
View Source
var LocalIps []string
View Source
var Root string


func DuPaths

func DuPaths() []string

func Hostname

func Hostname() (string, error)

func IP

func IP() string

func InitLocalIps

func InitLocalIps()

func InitRootDir

func InitRootDir()

func InitRpcClients

func InitRpcClients()

func IsTrustable

func IsTrustable(remoteAddr string) bool

func ParseConfig

func ParseConfig(cfg string)

func ReportPorts

func ReportPorts() []int64

func ReportProcs

func ReportProcs() map[string]map[int]string

func SendToTransfer

func SendToTransfer(metrics []*model.MetricValue)

func SetDuPaths

func SetDuPaths(paths []string)

func SetReportPorts

func SetReportPorts(ports []int64)

func SetReportProcs

func SetReportProcs(procs map[string]map[int]string)

func SetTrustableIps

func SetTrustableIps(ipStr string)

func TrustableIps

func TrustableIps() []string


type GlobalConfig

type GlobalConfig struct {
	Debug         bool             `json:"debug"`
	Hostname      string           `json:"hostname"`
	IP            string           `json:"ip"`
	Heartbeat     *HeartbeatConfig `json:"heartbeat"`
	Transfer      *TransferConfig  `json:"transfer"`
	IgnoreMetrics map[string]bool  `json:"ignore"`

func Config

func Config() *GlobalConfig

type HeartbeatConfig

type HeartbeatConfig struct {
	Enabled  bool   `json:"enabled"`
	Addr     string `json:"addr"`
	Interval int    `json:"interval"`
	Timeout  int    `json:"timeout"`

type PluginConfig

type PluginConfig struct {
	Enabled bool   `json:"enabled"`
	Dir     string `json:"dir"`
	Git     string `json:"git"`
	Rsync   string `json:"rsync"`
	LogDir  string `json:"logs"`
	Args    string `json:"args"`

type SingleConnRpcClient

type SingleConnRpcClient struct {

	RpcServer string
	Timeout   time.Duration
	// contains filtered or unexported fields
var (
	HbsClient      *SingleConnRpcClient
	TransferClient *SingleConnRpcClient

func (*SingleConnRpcClient) Call

func (this *SingleConnRpcClient) Call(method string, args interface{}, reply interface{}) error

type TransferConfig

type TransferConfig struct {
	Enabled  bool   `json:"enabled"`
	Addr     string `json:"addr"`
	Interval int    `json:"interval"`
	Timeout  int    `json:"timeout"`

Jump to

Keyboard shortcuts

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