Documentation ¶
Index ¶
- Constants
- Variables
- func AlarmHandler(cate, subcate, body string, params map[string]interface{})
- func Doit(cate, subcate, body string)
- func FileHandler(cate, subcate, body string, params map[string]interface{})
- func RegisterHandler(name string, handler HandlerFunc)
- type AlarmParam
- type AlarmStat
- type HandlerFunc
Constants ¶
View Source
const (
ROOT_DIR = "logs"
)
Variables ¶
View Source
var AlarmFunc = func(sender string, receivers []string, text string) { params := map[string]interface{}{ "Sender": sender, "Receivers": receivers, "Text": text, } json.NewEncoder(os.Stdout).Encode(params) }
请赋值成自己的报警处理函数
View Source
var Handlers = map[string]HandlerFunc{}
Functions ¶
func AlarmHandler ¶
func FileHandler ¶
func RegisterHandler ¶
func RegisterHandler(name string, handler HandlerFunc)
Types ¶
type AlarmParam ¶
type HandlerFunc ¶
Click to show internal directories.
Click to hide internal directories.