mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
Refactor package names and imports in InfrastructureAgent code files
This commit is contained in:
@@ -4,7 +4,7 @@ import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"log/slog"
|
||||
agentgo "oneuptime-infrastructure-agent"
|
||||
agentgo "oneuptime_infrastructure_agent"
|
||||
"os"
|
||||
|
||||
"github.com/gookit/config/v2"
|
||||
@@ -1,4 +1,4 @@
|
||||
package oneuptime_infrastructure_agent
|
||||
package model
|
||||
|
||||
type CPUMetrics struct {
|
||||
PercentUsed float64 `json:"percentUsed"`
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package oneuptime_infrastructure_agent
|
||||
package model
|
||||
|
||||
type BasicDiskMetrics struct {
|
||||
Total uint64 `json:"total"`
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package oneuptime_infrastructure_agent
|
||||
package model
|
||||
|
||||
type BasicInfrastructureMetrics struct {
|
||||
CpuMetrics *CPUMetrics `json:"cpuMetrics"`
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package oneuptime_infrastructure_agent
|
||||
package model
|
||||
|
||||
type MemoryMetrics struct {
|
||||
Total uint64 `json:"total"`
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package oneuptime_infrastructure_agent
|
||||
package model
|
||||
|
||||
type ServerMonitorReport struct {
|
||||
SecretKey string `json:"secretKey"`
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package oneuptime_infrastructure_agent
|
||||
package model
|
||||
|
||||
type ServerProcess struct {
|
||||
Pid int32 `json:"pid"`
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package oneuptime_infrastructure_agent
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package oneuptime_infrastructure_agent
|
||||
package utils
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package oneuptime_infrastructure_agent
|
||||
package utils
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package oneuptime_infrastructure_agent
|
||||
package utils
|
||||
|
||||
import (
|
||||
"log/slog"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package oneuptime_infrastructure_agent
|
||||
package utils
|
||||
|
||||
import (
|
||||
"log/slog"
|
||||
|
||||
"github.com/shirou/gopsutil/v3/mem"
|
||||
)
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package oneuptime_infrastructure_agent
|
||||
package utils
|
||||
|
||||
import (
|
||||
"github.com/shirou/gopsutil/v3/process"
|
||||
"log/slog"
|
||||
|
||||
"github.com/shirou/gopsutil/v3/process"
|
||||
)
|
||||
|
||||
// getServerProcesses retrieves the list of server processes
|
||||
|
||||
Reference in New Issue
Block a user