mirror of
https://github.com/jkstack/libagent.git
synced 2025-12-24 12:11:57 +08:00
修改包名
This commit is contained in:
4
agent.go
4
agent.go
@@ -3,9 +3,9 @@ package agent
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/jkstack/agent/conf"
|
||||
"github.com/jkstack/agent/internal/utils"
|
||||
"github.com/jkstack/anet"
|
||||
"github.com/jkstack/libagent/conf"
|
||||
"github.com/jkstack/libagent/internal/utils"
|
||||
)
|
||||
|
||||
// App app 接口,每一个agent必须实现以下接口
|
||||
|
||||
2
app.go
2
app.go
@@ -7,9 +7,9 @@ import (
|
||||
rt "runtime"
|
||||
"time"
|
||||
|
||||
"github.com/jkstack/agent/internal/utils"
|
||||
"github.com/jkstack/anet"
|
||||
"github.com/jkstack/jkframe/logging"
|
||||
"github.com/jkstack/libagent/internal/utils"
|
||||
"github.com/shirou/gopsutil/v3/process"
|
||||
)
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/jkstack/agent/internal/utils"
|
||||
"github.com/jkstack/anet"
|
||||
"github.com/jkstack/jkframe/logging"
|
||||
"github.com/jkstack/libagent/internal/utils"
|
||||
)
|
||||
|
||||
func (app *app) read(ctx context.Context, cancel context.CancelFunc, conn *websocket.Conn) {
|
||||
|
||||
@@ -8,10 +8,10 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/jkstack/agent/internal/hostinfo"
|
||||
"github.com/jkstack/agent/internal/utils"
|
||||
"github.com/jkstack/anet"
|
||||
"github.com/jkstack/jkframe/logging"
|
||||
"github.com/jkstack/libagent/internal/hostinfo"
|
||||
"github.com/jkstack/libagent/internal/utils"
|
||||
"github.com/shirou/gopsutil/cpu"
|
||||
"github.com/shirou/gopsutil/mem"
|
||||
)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package conf
|
||||
|
||||
import (
|
||||
"github.com/jkstack/agent/internal/utils"
|
||||
"github.com/jkstack/agent/limit"
|
||||
"github.com/jkstack/libagent/internal/utils"
|
||||
"github.com/jkstack/libagent/limit"
|
||||
)
|
||||
|
||||
// Configure 基础配置
|
||||
|
||||
@@ -7,9 +7,9 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/jkstack/agent/internal/utils"
|
||||
"github.com/jkstack/jkframe/logging"
|
||||
runtime "github.com/jkstack/jkframe/utils"
|
||||
"github.com/jkstack/libagent/internal/utils"
|
||||
)
|
||||
|
||||
// RewriteServer 重写服务器地址配置,每次连接时自动调用
|
||||
|
||||
2
go.mod
2
go.mod
@@ -1,4 +1,4 @@
|
||||
module github.com/jkstack/agent
|
||||
module github.com/jkstack/libagent
|
||||
|
||||
go 1.17
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package limit
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/jkstack/agent/internal/utils"
|
||||
"github.com/jkstack/libagent/internal/utils"
|
||||
)
|
||||
|
||||
func TestCGroups(t *testing.T) {
|
||||
|
||||
@@ -3,7 +3,7 @@ package limit
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/jkstack/agent/internal/utils"
|
||||
"github.com/jkstack/libagent/internal/utils"
|
||||
)
|
||||
|
||||
// DiskLimit 磁盘限制配置
|
||||
|
||||
Reference in New Issue
Block a user