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:
authormhsanaei <ho3ein.sanaei@gmail.com>2025-09-20 10:35:50 +0300
committermhsanaei <ho3ein.sanaei@gmail.com>2025-09-20 10:35:50 +0300
commit6ced549deaecb42b9bb93ea9efcb4c1bbaabe8a4 (patch)
tree28d8d82530476cf607e4d05ca189ae05868711e6 /web/service/server.go
parentf60682a6b7cb749fee403c84e2587c3ad7e7ced0 (diff)
docs: add comments for all functions
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