feat(logging): add real-time log streaming via websocket
- Implement WebSocket endpoint for streaming logs to clients - Add log broadcaster to manage client connections and history - Update documentation with new WebSocket API details - Include gorilla/websocket dependency for WebSocket support
This commit is contained in:
@@ -10,6 +10,8 @@ func setupRoutes() {
|
||||
postLog.Info("Setting up routes...")
|
||||
http.HandleFunc("/system/getStatus", GetStatusHandler)
|
||||
http.HandleFunc("/system/getSoftwareInfo", GetSoftwareInfoHandler)
|
||||
logHandler := postLog.NewLogSocketHandler(postLog.GetLogBroadcaster())
|
||||
http.HandleFunc("/system/getLogs", logHandler.Handle)
|
||||
|
||||
http.HandleFunc("/register", RegisterHandler)
|
||||
http.HandleFunc("/login", LoginHandler)
|
||||
|
||||
Reference in New Issue
Block a user