Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions beszel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ build-web-ui:
fi

build-agent: tidy
GOOS=$(OS) GOARCH=$(ARCH) go build -o ./build/beszel-agent_$(OS)_$(ARCH) -ldflags "-w -s" beszel/cmd/agent
GOOS=$(OS) GOARCH=$(ARCH) go build -o ./build/beszel-agent_$(OS)_$(ARCH) -ldflags "-w -s" github.com/henrygd/beszel/cmd/agent

build-hub: tidy $(if $(filter false,$(SKIP_WEB)),build-web-ui)
GOOS=$(OS) GOARCH=$(ARCH) go build -o ./build/beszel_$(OS)_$(ARCH) -ldflags "-w -s" beszel/cmd/hub
GOOS=$(OS) GOARCH=$(ARCH) go build -o ./build/beszel_$(OS)_$(ARCH) -ldflags "-w -s" github.com/henrygd/beszel/cmd/hub

build: build-agent build-hub

Expand Down Expand Up @@ -58,9 +58,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

# KEY="..." make -j dev
Expand Down
5 changes: 3 additions & 2 deletions beszel/cmd/agent/agent.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package main

import (
"beszel"
"beszel/internal/agent"
"fmt"
"log"
"os"
"strings"

"github.com/henrygd/beszel"
"github.com/henrygd/beszel/internal/agent"
)

func main() {
Expand Down
6 changes: 3 additions & 3 deletions beszel/cmd/hub/hub.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package main

import (
"beszel"
"beszel/internal/hub"
"github.com/henrygd/beszel"
"github.com/henrygd/beszel/internal/hub"

_ "beszel/migrations"
_ "github.com/henrygd/beszel/migrations"

"github.com/pocketbase/pocketbase"
"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion beszel/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module beszel
module github.com/henrygd/beszel

go 1.23

Expand Down
5 changes: 3 additions & 2 deletions beszel/internal/agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
package agent

import (
"beszel"
"beszel/internal/entities/system"
"context"
"log/slog"
"os"
"strings"

"github.com/henrygd/beszel"
"github.com/henrygd/beszel/internal/entities/system"

"github.com/shirou/gopsutil/v4/common"
)

Expand Down
3 changes: 2 additions & 1 deletion beszel/internal/agent/disk.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package agent

import (
"beszel/internal/entities/system"
"log/slog"
"os"
"path/filepath"
"strings"
"time"

"github.com/henrygd/beszel/internal/entities/system"

"github.com/shirou/gopsutil/v4/disk"
)

Expand Down
3 changes: 2 additions & 1 deletion beszel/internal/agent/docker.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package agent

import (
"beszel/internal/entities/container"
"context"
"encoding/json"
"fmt"
Expand All @@ -14,6 +13,8 @@ import (
"sync"
"time"

"github.com/henrygd/beszel/internal/entities/container"

"github.com/blang/semver"
)

Expand Down
3 changes: 2 additions & 1 deletion beszel/internal/agent/gpu.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package agent

import (
"beszel/internal/entities/system"
"bufio"
"encoding/json"
"fmt"
Expand All @@ -12,6 +11,8 @@ import (
"sync"
"time"

"github.com/henrygd/beszel/internal/entities/system"

"golang.org/x/exp/slog"
)

Expand Down
5 changes: 3 additions & 2 deletions beszel/internal/agent/system.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package agent

import (
"beszel"
"beszel/internal/entities/system"
"bufio"
"fmt"
"log/slog"
Expand All @@ -11,6 +9,9 @@ import (
"strings"
"time"

"github.com/henrygd/beszel"
"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"
Expand Down
3 changes: 2 additions & 1 deletion beszel/internal/agent/update.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package agent

import (
"beszel"
"fmt"
"os"
"strings"

"github.com/henrygd/beszel"

"github.com/blang/semver"
"github.com/rhysd/go-github-selfupdate/selfupdate"
)
Expand Down
3 changes: 2 additions & 1 deletion beszel/internal/alerts/alerts.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
package alerts

import (
"beszel/internal/entities/system"
"fmt"
"net/mail"
"net/url"
"strings"
"time"

"github.com/henrygd/beszel/internal/entities/system"

"github.com/containrrr/shoutrrr"
"github.com/goccy/go-json"
"github.com/pocketbase/dbx"
Expand Down
3 changes: 2 additions & 1 deletion beszel/internal/entities/system/system.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package system

import (
"beszel/internal/entities/container"
"time"

"github.com/henrygd/beszel/internal/entities/container"
)

type Stats struct {
Expand Down
3 changes: 2 additions & 1 deletion beszel/internal/hub/config.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package hub

import (
"beszel/internal/entities/system"
"fmt"
"log"
"os"
"path/filepath"
"strconv"

"github.com/henrygd/beszel/internal/entities/system"

"github.com/pocketbase/dbx"
"github.com/pocketbase/pocketbase/apis"
"github.com/pocketbase/pocketbase/core"
Expand Down
13 changes: 7 additions & 6 deletions beszel/internal/hub/hub.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
package hub

import (
"beszel"
"beszel/internal/alerts"
"beszel/internal/entities/system"
"beszel/internal/records"
"beszel/internal/users"
"beszel/site"
"github.com/henrygd/beszel"
"github.com/henrygd/beszel/internal/alerts"
"github.com/henrygd/beszel/internal/entities/system"
"github.com/henrygd/beszel/internal/records"
"github.com/henrygd/beszel/internal/users"
"github.com/henrygd/beszel/site"

"context"
"crypto/ed25519"
"encoding/pem"
Expand Down
3 changes: 2 additions & 1 deletion beszel/internal/hub/update.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package hub

import (
"beszel"
"fmt"
"os"
"strings"

"github.com/henrygd/beszel"

"github.com/blang/semver"
"github.com/rhysd/go-github-selfupdate/selfupdate"
"github.com/spf13/cobra"
Expand Down
5 changes: 3 additions & 2 deletions beszel/internal/records/records.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
package records

import (
"beszel/internal/entities/container"
"beszel/internal/entities/system"
"log"
"math"
"time"

"github.com/henrygd/beszel/internal/entities/container"
"github.com/henrygd/beszel/internal/entities/system"

"github.com/goccy/go-json"
"github.com/pocketbase/dbx"
"github.com/pocketbase/pocketbase"
Expand Down
3 changes: 2 additions & 1 deletion beszel/internal/users/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
package users

import (
"beszel/migrations"
"log"
"net/http"

"github.com/henrygd/beszel/migrations"

"github.com/pocketbase/pocketbase"
"github.com/pocketbase/pocketbase/core"
)
Expand Down