g

package
v0.0.0-...-4a8772d Latest Latest
Warning

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

Go to latest
Published: May 16, 2018 License: Apache-2.0 Imports: 13 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAPIUrl

func GetAPIUrl(service string) string

GetAPIUrl return the RabbitMQ api url

func GetHost

func GetHost() string

GetHost get hostname (syscall)

func ParseConfig

func ParseConfig(cfg string)

ParseConfig ...

func RabbitAPI

func RabbitAPI(service string) ([]byte, error)

RabbitAPI ...

Types

type EnableConfig

type EnableConfig struct {
	Collect   bool `yaml:"collect"`
	LogRotate bool `yaml:"log_rotate"`
	Witch     bool `yaml:"witch"`
}

EnableConfig configs which can be used

type FalconConfig

type FalconConfig struct {
	API string `yaml:"api"`
}

FalconConfig ...

type GlobalConfig

type GlobalConfig struct {
	Debug     bool             `yaml:"debug"`
	Details   bool             `yaml:"details"`
	Hostname  string           `yaml:"hostname"`
	Batchsize int              `yaml:"batchsize"`
	Interval  int64            `yaml:"interval"`
	Rabbit    *RabbitConfig    `yaml:"rabbitmq"`
	Falcon    *FalconConfig    `yaml:"falcon"`
	HTTP      *HTTPConfig      `yaml:"http"`
	Cron      *SchedulerConfig `yaml:"scheduler"`
	Enabled   *EnableConfig    `yaml:"enabled"`
	Ignores   []string         `yaml:"ignore_queue"`
	Qrunning  []string         `yaml:"qrunning"`
	Witch     *WitchConfig     `yaml:"witch"`
}

GlobalConfig ...

func Config

func Config() *GlobalConfig

Config ...

type HTTPConfig

type HTTPConfig struct {
	ConnTimeout int `yaml:"conn_timeout"`
	RespTimeout int `yaml:"response_timeout"`
}

HTTPConfig ...

type RabbitConfig

type RabbitConfig struct {
	Host     string `yaml:"host"`
	Port     int    `yaml:"port"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
}

RabbitConfig ...

type SchedulerConfig

type SchedulerConfig struct {
	LogRotate string `yaml:"log_rotate"`
}

SchedulerConfig ...

type StatsDB

type StatsDB struct {
	CurrentLocate   string `json:"current_locate"`
	PreviousLocate  string `json:"previous_locate"`
	LastChangeTime  string `json:"last_change"`
	LastCollectTime string `json:"last_collect"`
}

StatsDB stats management database

func NewStatsDB

func NewStatsDB() *StatsDB

NewStatsDB create an new stats management database cache

func (*StatsDB) SetCurrentLocate

func (s *StatsDB) SetCurrentLocate(locate string)

SetCurrentLocate setting current database location

type WitchConfig

type WitchConfig struct {
	ListenAddr string            `yaml:"listen"`
	Control    string            `yaml:"control"`
	Service    string            `yaml:"service"`
	Process    string            `yaml:"process"`
	Command    string            `yaml:"command"`
	PidFile    string            `yaml:"pid_file"`
	Auth       map[string]string `yaml:"auth"`
}

WitchConfig Program Config ...

Jump to

Keyboard shortcuts

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