Rename Go module to github.com/henrygd/beszel

This commit is contained in:
Ayman Nedjmeddine
2025-01-31 14:15:00 +01:00
committed by henrygd
parent fd050f2a8f
commit cda8fa7efd
16 changed files with 47 additions and 36 deletions

View File

@@ -84,9 +84,9 @@ dev-hub:
dev-agent:
@if command -v entr >/dev/null 2>&1; then \
find ./cmd/agent/*.go ./internal/agent/*.go | entr -r go run beszel/cmd/agent; \
find ./cmd/agent/*.go ./internal/agent/*.go | entr -r go run github.com/henrygd/beszel/cmd/agent; \
else \
go run beszel/cmd/agent; \
go run github.com/henrygd/beszel/cmd/agent; \
fi
build-dotnet:

View File

@@ -1,14 +1,14 @@
package main
import (
"beszel"
"beszel/internal/agent"
"beszel/internal/agent/health"
"fmt"
"log"
"os"
"strings"
"github.com/henrygd/beszel"
"github.com/henrygd/beszel/internal/agent"
"github.com/henrygd/beszel/internal/agent/health"
"github.com/spf13/pflag"
"golang.org/x/crypto/ssh"
)

View File

@@ -1,15 +1,16 @@
package main
import (
"beszel"
"beszel/internal/hub"
_ "beszel/migrations"
"fmt"
"log"
"net/http"
"os"
"time"
"github.com/henrygd/beszel"
"github.com/henrygd/beszel/internal/hub"
_ "github.com/henrygd/beszel/migrations"
"github.com/pocketbase/pocketbase"
"github.com/pocketbase/pocketbase/plugins/migratecmd"
"github.com/spf13/cobra"

View File

@@ -1,4 +1,4 @@
module beszel
module github.com/henrygd/beszel
go 1.25.1

View File

@@ -2,8 +2,6 @@
package agent
import (
"beszel"
"beszel/internal/entities/system"
"crypto/sha256"
"encoding/hex"
"log/slog"
@@ -14,6 +12,8 @@ import (
"time"
"github.com/gliderlabs/ssh"
"github.com/henrygd/beszel"
"github.com/henrygd/beszel/internal/entities/system"
"github.com/shirou/gopsutil/v4/host"
gossh "golang.org/x/crypto/ssh"
)

View File

@@ -1,7 +1,6 @@
package agent
import (
"beszel/internal/entities/system"
"log/slog"
"os"
"path/filepath"
@@ -9,6 +8,8 @@ import (
"strings"
"time"
"github.com/henrygd/beszel/internal/entities/system"
"github.com/shirou/gopsutil/v4/disk"
)

View File

@@ -1,7 +1,6 @@
package agent
import (
"beszel/internal/entities/container"
"bytes"
"context"
"encoding/json"
@@ -15,6 +14,8 @@ import (
"sync"
"time"
"github.com/henrygd/beszel/internal/entities/container"
"github.com/blang/semver"
)

View File

@@ -1,7 +1,6 @@
package agent
import (
"beszel/internal/entities/system"
"bufio"
"bytes"
"encoding/json"
@@ -13,6 +12,8 @@ import (
"sync"
"time"
"github.com/henrygd/beszel/internal/entities/system"
"golang.org/x/exp/slog"
)

View File

@@ -1,9 +1,6 @@
package agent
import (
"beszel"
"beszel/internal/agent/battery"
"beszel/internal/entities/system"
"bufio"
"fmt"
"log/slog"
@@ -12,6 +9,10 @@ import (
"strings"
"time"
"github.com/henrygd/beszel"
"github.com/henrygd/beszel/internal/agent/battery"
"github.com/henrygd/beszel/internal/entities/system"
"github.com/shirou/gopsutil/v4/cpu"
"github.com/shirou/gopsutil/v4/disk"
"github.com/shirou/gopsutil/v4/host"

View File

@@ -1,13 +1,14 @@
package agent
import (
"beszel/internal/ghupdate"
"fmt"
"log"
"os"
"os/exec"
"runtime"
"strings"
"github.com/henrygd/beszel/internal/ghupdate"
)
// restarter knows how to restart the beszel-agent service.

View File

@@ -3,8 +3,9 @@ package system
// TODO: this is confusing, make common package with common/types common/helpers etc
import (
"beszel/internal/entities/container"
"time"
"github.com/henrygd/beszel/internal/entities/container"
)
type Stats struct {

View File

@@ -2,13 +2,14 @@
package config
import (
"beszel/internal/entities/system"
"fmt"
"log"
"os"
"path/filepath"
"github.com/google/uuid"
"github.com/henrygd/beszel/internal/entities/system"
"github.com/pocketbase/dbx"
"github.com/pocketbase/pocketbase/core"
"github.com/spf13/cast"

View File

@@ -2,12 +2,6 @@
package hub
import (
"beszel"
"beszel/internal/alerts"
"beszel/internal/hub/config"
"beszel/internal/hub/systems"
"beszel/internal/records"
"beszel/internal/users"
"crypto/ed25519"
"encoding/pem"
"fmt"
@@ -18,6 +12,11 @@ import (
"strings"
"time"
"github.com/henrygd/beszel"
"github.com/henrygd/beszel/internal/alerts"
"github.com/henrygd/beszel/internal/records"
"github.com/henrygd/beszel/internal/users"
"github.com/google/uuid"
"github.com/pocketbase/pocketbase"
"github.com/pocketbase/pocketbase/apis"

View File

@@ -1,12 +1,12 @@
package hub
import (
"beszel/internal/ghupdate"
"fmt"
"log"
"os"
"os/exec"
"github.com/henrygd/beszel/internal/ghupdate"
"github.com/spf13/cobra"
)

View File

@@ -2,8 +2,6 @@
package records
import (
"beszel/internal/entities/container"
"beszel/internal/entities/system"
"encoding/json"
"fmt"
"log"
@@ -11,6 +9,9 @@ import (
"strings"
"time"
"github.com/henrygd/beszel/internal/entities/container"
"github.com/henrygd/beszel/internal/entities/system"
"github.com/pocketbase/dbx"
"github.com/pocketbase/pocketbase/core"
)
@@ -39,12 +40,14 @@ type StatsRecord struct {
}
// global variables for reusing allocations
var statsRecord StatsRecord
var containerStats []container.Stats
var sumStats system.Stats
var tempStats system.Stats
var queryParams = make(dbx.Params, 1)
var containerSums = make(map[string]*container.Stats)
var (
statsRecord StatsRecord
containerStats []container.Stats
sumStats system.Stats
tempStats system.Stats
queryParams = make(dbx.Params, 1)
containerSums = make(map[string]*container.Stats)
)
// Create longer records by averaging shorter records
func (rm *RecordManager) CreateLongerRecords() {

View File

@@ -2,10 +2,11 @@
package users
import (
"beszel/migrations"
"log"
"net/http"
"github.com/henrygd/beszel/migrations"
"github.com/pocketbase/dbx"
"github.com/pocketbase/pocketbase/core"
)