Switch to traceable sync for most everything

This commit is contained in:
Marc Brooks 2025-11-18 18:21:10 -06:00
parent 979b32b86c
commit 5964077168
No known key found for this signature in database
GPG Key ID: 583A6AF2D6AE1DC6
17 changed files with 40 additions and 28 deletions

View File

@ -8,18 +8,17 @@ import (
"fmt"
"net/http"
"net/url"
"sync"
"time"
"github.com/jetkvm/kvm/internal/sync"
"github.com/coder/websocket"
"github.com/coder/websocket/wsjson"
"github.com/coreos/go-oidc/v3/oidc"
"github.com/gin-gonic/gin"
"github.com/google/uuid"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"github.com/coreos/go-oidc/v3/oidc"
"github.com/coder/websocket"
"github.com/gin-gonic/gin"
"github.com/rs/zerolog"
)

View File

@ -5,12 +5,13 @@ import (
"fmt"
"os"
"strconv"
"sync"
"github.com/jetkvm/kvm/internal/confparser"
"github.com/jetkvm/kvm/internal/logging"
"github.com/jetkvm/kvm/internal/network/types"
"github.com/jetkvm/kvm/internal/sync"
"github.com/jetkvm/kvm/internal/usbgadget"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)

View File

@ -7,9 +7,10 @@ import (
"os"
"strconv"
"strings"
"sync"
"time"
"github.com/jetkvm/kvm/internal/sync"
"github.com/prometheus/common/version"
)

View File

@ -4,7 +4,8 @@ import (
"fmt"
"os"
"strings"
"sync"
"github.com/jetkvm/kvm/internal/sync"
)
const (

3
hw.go
View File

@ -6,8 +6,9 @@ import (
"os/exec"
"regexp"
"strings"
"sync"
"time"
"github.com/jetkvm/kvm/internal/sync"
)
func extractSerialNumber() (string, error) {

View File

@ -5,9 +5,10 @@ import (
"net"
"reflect"
"strings"
"sync"
"github.com/jetkvm/kvm/internal/logging"
"github.com/jetkvm/kvm/internal/sync"
pion_mdns "github.com/pion/mdns/v2"
"github.com/rs/zerolog"
"golang.org/x/net/ipv4"

View File

@ -1,9 +1,10 @@
package native
import (
"sync"
"time"
"github.com/jetkvm/kvm/internal/sync"
"github.com/Masterminds/semver/v3"
"github.com/rs/zerolog"
)

View File

@ -1,6 +1,6 @@
package native
import "sync"
import "github.com/jetkvm/kvm/internal/sync"
var (
instance *Native

View File

@ -4,10 +4,11 @@ import (
"fmt"
"os"
"os/exec"
"sync"
"time"
"github.com/jetkvm/kvm/internal/network/types"
"github.com/jetkvm/kvm/internal/sync"
"github.com/rs/zerolog"
)

View File

@ -5,9 +5,10 @@ import (
"context"
"fmt"
"os"
"sync"
"time"
"github.com/jetkvm/kvm/internal/sync"
"github.com/rs/xid"
"github.com/rs/zerolog"
)

View File

@ -6,10 +6,11 @@ import (
"context"
"os"
"path"
"sync"
"time"
"github.com/jetkvm/kvm/internal/logging"
"github.com/jetkvm/kvm/internal/sync"
"github.com/rs/zerolog"
)

View File

@ -9,9 +9,10 @@ import (
"path/filepath"
"strconv"
"strings"
"sync"
"time"
"github.com/jetkvm/kvm/internal/sync"
"github.com/rs/zerolog"
)

View File

@ -6,7 +6,8 @@ import (
"os"
"path"
"strings"
"sync"
"github.com/jetkvm/kvm/internal/sync"
"github.com/rs/zerolog"
)

View File

@ -2,11 +2,12 @@ package kvm
import (
"os"
"sync"
"time"
"github.com/Masterminds/semver/v3"
"github.com/jetkvm/kvm/internal/native"
"github.com/jetkvm/kvm/internal/sync"
"github.com/Masterminds/semver/v3"
"github.com/pion/webrtc/v4/pkg/media"
)

View File

@ -10,16 +10,16 @@ import (
"path"
"path/filepath"
"strings"
"sync"
"syscall"
"time"
"github.com/jetkvm/kvm/internal/sync"
"github.com/jetkvm/kvm/resource"
"github.com/gin-gonic/gin"
"github.com/google/uuid"
"github.com/pion/webrtc/v4"
"github.com/psanford/httpreadat"
"github.com/jetkvm/kvm/resource"
)
func writeFile(path string, data string) error {

View File

@ -7,8 +7,8 @@ import (
"errors"
"fmt"
"net/http"
"sync"
"github.com/jetkvm/kvm/internal/sync"
"github.com/jetkvm/kvm/internal/websecure"
)

View File

@ -6,15 +6,16 @@ import (
"encoding/json"
"net"
"strings"
"sync"
"time"
"github.com/jetkvm/kvm/internal/hidrpc"
"github.com/jetkvm/kvm/internal/logging"
"github.com/jetkvm/kvm/internal/sync"
"github.com/jetkvm/kvm/internal/usbgadget"
"github.com/coder/websocket"
"github.com/coder/websocket/wsjson"
"github.com/gin-gonic/gin"
"github.com/jetkvm/kvm/internal/hidrpc"
"github.com/jetkvm/kvm/internal/logging"
"github.com/jetkvm/kvm/internal/usbgadget"
"github.com/pion/webrtc/v4"
"github.com/rs/zerolog"
)