g

package
v0.0.0-...-a47f05f Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2018 License: Apache-2.0 Imports: 11 Imported by: 5

Documentation

Index

Constants

View Source
const (
	VERSION = "0.4.3"
)

Variables

View Source
var (
	Root       string
	ConfigFile string
)

Functions

func DelCronSata

func DelCronSata(id string)

func GetAStat

func GetAStat() map[string]string

func GetCStat

func GetCStat() map[string]StatCInfo

func GetEStat

func GetEStat() [20]string

func GetRoot

func GetRoot() string

func GetTStat

func GetTStat() [40]sIns

func InitStat

func InitStat()

func ParseConfig

func ParseConfig(cfg string)

func SaveConfig

func SaveConfig()

func SaveCronSata

func SaveCronSata(id string, app string, funcs string, mode string, rule string, comment string)

func SaveErrorStat

func SaveErrorStat(err string)

func SaveTaskStat

func SaveTaskStat(ins SchedulerInstruct, flag int32, costtime int32)

func UpdateCronSata

func UpdateCronSata(id string)

func UpdateHbTime

func UpdateHbTime()

Types

type AgentCronConfig

type AgentCronConfig struct {
	Comment string `json:"comment"`
	Enabled bool   `json:"enabled"`
}

type ApiErrresut

type ApiErrresut struct {
	Flag  string `json:"flag"`
	Error string `json:"error"`
}

type ApiExecresult

type ApiExecresult struct {
	Rt_id           string `json:"id"`
	Worker_message  string `json:"worker_message"`
	Worker_flag     string `json:"worker_flag"`
	Worker_costtime int32  `json:"worker_costtime"`
}

type Apiresut

type Apiresut struct {
	Flag   string        `json:"flag"`
	Error  string        `json:"error"`
	Result ApiExecresult `json:"result"`
}

type AppCfgStrct

type AppCfgStrct struct {
	Pro *ProStrct `json:"Processor"`
}

type DevmodeConfig

type DevmodeConfig struct {
	Comment string `json:"comment"`
	Enabled bool   `json:"enabled"`
	Authid  string `json:"authid"`
	Authkey string `json:"authkey"`
}

type GlobalConfig

type GlobalConfig struct {
	Asset            string            `json:"asset"`
	Ip               string            `json:"ip"`
	Port             int               `json:"port"`
	AuthIps          []string          `json:"authips"`
	HeartBeat        *HeartbeatConfig  `json:"heartbeat"`
	Scheduler        *SchedulerConfig  `json:"scheduler"`
	Agentcron        *AgentCronConfig  `json:"agentcron"`
	Http             *HttpConfig       `json:"http"`
	AppsDownloadAddr string            `json:"appsdownloadaddr"`
	Apps             map[string]string `json:"apps"`
	Devmode          *DevmodeConfig    `json:"devmode"`
}

func Config

func Config() *GlobalConfig

type HeartbeatConfig

type HeartbeatConfig struct {
	Comment  string `json:"comment"`
	Enabled  bool   `json:"enabled"`
	Addr     string `json:"addr"`
	Port     int    `json:"port"`
	Interval int    `json:"interval"`
	Timeout  int    `json:"timeout"`
}

type HttpConfig

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

type ProStrct

type ProStrct struct {
	Addr    string `json:"addr"`
	Port    int    `json:"port"`
	Timeout int    `json:"timeout"`
}

type SchedulerConfig

type SchedulerConfig struct {
	Addr    string `json:"addr"`
	Port    int    `json:"port"`
	Timeout int    `json:"timeout"`
}

type SchedulerInstruct

type SchedulerInstruct struct {
	ID      string `thrift:"id,1" json:"id"`
	IP      string `thrift:"ip,2" json:"ip"`
	Type    string `thrift:"type,3" json:"type"`
	Mode    string `thrift:"mode,4" json:"mode"`
	App     string `thrift:"app,5" json:"app"`
	Func    string `thrift:"func,6" json:"func"`
	Param   string `thrift:"param,7" json:"param"`
	Timeout int32  `thrift:"timeout,8" json:"timeout"`
	Proxy   string `thrift:"proxy,9" json:"proxy"`
}

type StatCInfo

type StatCInfo struct {
	Id       string
	App      string
	Func     string
	Mode     string
	Rule     string
	Comment  string
	Lastexec string
}

type StatGInfo

type StatGInfo struct {
	Mode   string
	Asset  string
	Ip     string
	Uptime string
	Hbtime string
	Ver    string
	Apps   map[string]string
}

func GetGStat

func GetGStat() StatGInfo

Jump to

Keyboard shortcuts

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