mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 10:25:52 +02:00
refactor: replace upgrader with version package for runtime and release information
This commit is contained in:
parent
8e212ae79b
commit
d0cf93d5e3
11 changed files with 182 additions and 121 deletions
19
internal/upgrader/docker.go
Normal file
19
internal/upgrader/docker.go
Normal file
|
@ -0,0 +1,19 @@
|
|||
package upgrader
|
||||
|
||||
import (
|
||||
"github.com/0xJacky/Nginx-UI/internal/docker"
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/uozi-tech/cosy/logger"
|
||||
)
|
||||
|
||||
func DockerUpgrade(ws *websocket.Conn, control *Control) {
|
||||
err := docker.UpgradeStepOne(control.Channel)
|
||||
if err != nil {
|
||||
_ = ws.WriteJSON(CoreUpgradeResp{
|
||||
Status: UpgradeStatusError,
|
||||
Message: err.Error(),
|
||||
})
|
||||
logger.Error(err)
|
||||
return
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue