Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'web/service/server.go')
-rw-r--r--web/service/server.go15
1 files changed, 11 insertions, 4 deletions
diff --git a/web/service/server.go b/web/service/server.go
index 03199b50..9fe42e2c 100644
--- a/web/service/server.go
+++ b/web/service/server.go
@@ -35,14 +35,18 @@ import (
"github.com/shirou/gopsutil/v4/net"
)
+// ProcessState represents the current state of a system process.
type ProcessState string
+// Process state constants
const (
- Running ProcessState = "running"
- Stop ProcessState = "stop"
- Error ProcessState = "error"
+ Running ProcessState = "running" // Process is running normally
+ Stop ProcessState = "stop" // Process is stopped
+ Error ProcessState = "error" // Process is in error state
)
+// Status represents comprehensive system and application status information.
+// It includes CPU, memory, disk, network statistics, and Xray process status.
type Status struct {
T time.Time `json:"-"`
Cpu float64 `json:"cpu"`
@@ -89,10 +93,13 @@ type Status struct {
} `json:"appStats"`
}
+// Release represents information about a software release from GitHub.
type Release struct {
- TagName string `json:"tag_name"`
+ TagName string `json:"tag_name"` // The tag name of the release
}
+// ServerService provides business logic for server monitoring and management.
+// It handles system status collection, IP detection, and application statistics.
type ServerService struct {
xrayService XrayService
inboundService InboundService