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: dev-agent:
@if command -v entr >/dev/null 2>&1; then \ @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 \ else \
go run beszel/cmd/agent; \ go run github.com/henrygd/beszel/cmd/agent; \
fi fi
build-dotnet: build-dotnet:

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,13 +1,14 @@
package agent package agent
import ( import (
"beszel/internal/ghupdate"
"fmt" "fmt"
"log" "log"
"os" "os"
"os/exec" "os/exec"
"runtime" "runtime"
"strings" "strings"
"github.com/henrygd/beszel/internal/ghupdate"
) )
// restarter knows how to restart the beszel-agent service. // 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 // TODO: this is confusing, make common package with common/types common/helpers etc
import ( import (
"beszel/internal/entities/container"
"time" "time"
"github.com/henrygd/beszel/internal/entities/container"
) )
type Stats struct { type Stats struct {

View File

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

View File

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

View File

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

View File

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

View File

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