Compare commits

..

3 Commits

Author SHA1 Message Date
wuko233 62f935c2f3 fix: 修改管理端地址,更加规范 2026-03-13 15:09:52 +08:00
wuko233 51733d88e8 fix: 修复拼写错误 2026-03-13 09:41:53 +08:00
wuko233 a6db49947e fix: 修复函数名称拼写错误并更新.gitignore文件 2026-03-13 08:47:14 +08:00
3 changed files with 5 additions and 4 deletions

1
.gitignore vendored
View File

@ -43,3 +43,4 @@ test/
# 编译文件
sysmonitord
fixroad.md

View File

@ -19,7 +19,7 @@ import (
const (
OfficialConfigURL = "http://localhost:8080/api/configs/official.json"
UserConfigURL = "http://localhost:8080/api/configs/user.json"
CenterServerURL = "ws://localhost:8080/ws/monitor"
CenterServerURL = "ws://localhost:8090/api/v1/ws"
)
func main() {
@ -102,7 +102,7 @@ func main() {
go func() {
for alert := range sshAlertChan {
packet := network.NewPactet("SSH_ALERT", alert)
packet := network.NewPacket("SSH_ALERT", alert)
auditClient.SendQueue(packet)
}
}()
@ -119,7 +119,7 @@ func main() {
go func() {
for metrics := range metricsChan {
packet := network.NewPactet("STATUS_UPDATE", metrics)
packet := network.NewPacket("STATUS_UPDATE", metrics)
centerClient.SendQueue(packet)
}
}()

View File

@ -8,7 +8,7 @@ type Packet struct {
Payload interface{} `json:"payload"`
}
func NewPactet(msgType string, payload interface{}) Packet {
func NewPacket(msgType string, payload interface{}) Packet {
return Packet{
Type: msgType,
Timestamp: time.Now().Unix(),