g

package
v0.0.0-...-35e0199 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BinaryName string
	Version    string
	GitCommit  string
)
View Source
var (
	TransferClientsLock *sync.RWMutex                   = new(sync.RWMutex)
	TransferClients     map[string]*SingleConnRpcClient = map[string]*SingleConnRpcClient{}
)
View Source
var (
	ConfigFile string
)

Functions

func InitLog

func InitLog(level string) (err error)

func ParseConfig

func ParseConfig(cfg string)

func SendMetrics

func SendMetrics(metrics []*model.MetricValue, resp *model.TransferResponse)

func VersionMsg

func VersionMsg() string

Types

type FromConfig

type FromConfig struct {
	BeginTime    string `json:"UTC_begin_time"`
	EndTime      string `json:"UTC_end_time"`
	ConnTimeout  int    `json:"connect_timeout"`
	RequTimeout  int    `json:"request_timeout"`
	PlusApi      string `json:"plus_api"`
	PlusApiToken string `json:"plus_api_token"`
}

type GlobalConfig

type GlobalConfig struct {
	Debug     bool             `json:"debug"`
	Workers   int              `json:"workers"`
	Batch     int              `json:"batch"`
	Interval  int64            `json:"batch_interval_ms"`
	MaxFiles  uint64           `json:"max_filefds"`
	From      *FromConfig      `json:"from"`
	Transfer  *TransferConfig  `json:"transfer"`
	WhiteList *WhiteListConfig `json:"whitelist"`
}

func Config

func Config() *GlobalConfig

type SingleConnRpcClient

type SingleConnRpcClient struct {
	sync.Mutex

	RpcServer string
	Timeout   time.Duration
	// contains filtered or unexported fields
}

func (*SingleConnRpcClient) Call

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

type TransferConfig

type TransferConfig struct {
	Enabled  bool     `json:"enabled"`
	Addrs    []string `json:"addrs"`
	Interval int      `json:"interval"`
	Timeout  int      `json:"timeout"`
}

type WhiteListConfig

type WhiteListConfig struct {
	Enabled        bool     `json:"enabled"`
	MetricsPrefix  []string `json:"metric_prefix"`
	EndpointPrefix []string `json:"endpoint_prefix"`
}

Jump to

Keyboard shortcuts

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