Documentation
¶
Index ¶
- Variables
- func GetNodeInfo() (*model.NodeInfo, error)
- func GetNodeRule() (*model.Rule, error)
- func GetUserList() ([]*model.UserInfo, error)
- func PostAllUserTraffic(allUserTraffic []*model.UserTraffic) error
- func PostNodeOnline(nodeOnline []*model.NodeOnline) error
- func PostNodeStatus(status model.NodeStatus) error
- func PostTrigger(trigger model.Trigger) error
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Host = core.GetApp().Host() + "/api/ssr/v1"
Functions ¶
func GetNodeInfo ¶
GetNodeInfo Get Node Info
Example ¶
Host = "http://localhost" logrus.SetLevel(logrus.DebugLevel) result, _ := GetNodeInfo() fmt.Printf("value: %+v \n", result)
Output:
func GetUserList ¶
GetUserList Get User List
Example ¶
Host = "http://dash.kitami.ml" logrus.SetLevel(logrus.DebugLevel) result, _ := GetUserList() fmt.Printf("value: %+v\n", result)
Output:
func PostAllUserTraffic ¶
func PostAllUserTraffic(allUserTraffic []*model.UserTraffic) error
Example ¶
Host = "http://localhost" logrus.SetLevel(logrus.DebugLevel) PostAllUserTraffic([]*model.UserTraffic{ { 1, 200, 200, 0, 0, }, })
Output:
func PostNodeOnline ¶
func PostNodeOnline(nodeOnline []*model.NodeOnline) error
Example ¶
Host = "http://localhost" logrus.SetLevel(logrus.DebugLevel) PostNodeOnline([]*model.NodeOnline{ { 1, "192.168.1.1", }, })
Output:
func PostNodeStatus ¶
func PostNodeStatus(status model.NodeStatus) error
Example ¶
Host = "http://localhost" logrus.SetLevel(logrus.DebugLevel) PostNodeStatus(model.NodeStatus{ CPU: "10%", MEM: "10%", DISK: "10", NET: "up: 50kb,down: 50kb", UPTIME: 2000, })
Output:
func PostTrigger ¶
PostTrigger when user trigger audit rules then report
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.