Skip to content

Commit

Permalink
Merge pull request #31 from Starttoaster/migrate-client-library
Browse files Browse the repository at this point in the history
Move client library for proxmox to its own repository
  • Loading branch information
Starttoaster authored Mar 26, 2024
2 parents 1778b8a + 7ac1a74 commit e771460
Show file tree
Hide file tree
Showing 13 changed files with 10 additions and 637 deletions.
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@ module github.com/starttoaster/proxmox-exporter
go 1.21

require (
github.com/google/go-querystring v1.1.0
github.com/gorilla/mux v1.8.1
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/prometheus/client_golang v1.19.0
github.com/spf13/cobra v1.8.0
github.com/spf13/viper v1.18.2
github.com/starttoaster/go-proxmox v0.0.0-20240326051917-0241210bd2cf
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ=
github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk=
github.com/starttoaster/go-proxmox v0.0.0-20240326051917-0241210bd2cf h1:YDa7Z+sbGiY8DZ2waP2FKSb66wO82zdqWRRu04LkIqs=
github.com/starttoaster/go-proxmox v0.0.0-20240326051917-0241210bd2cf/go.mod h1:P+jWRA2dlufueBnqOD4CE0vq5E5//txKqi+7WsM2XXQ=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
Expand Down
2 changes: 1 addition & 1 deletion internal/prometheus/lxc.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"strings"

"github.com/prometheus/client_golang/prometheus"
"github.com/starttoaster/proxmox-exporter/pkg/proxmox"
proxmox "github.com/starttoaster/go-proxmox"
)

// collectLxcMetricsResponse is a struct wrapper for all LXC metrics that need to be passed back for control flow,
Expand Down
2 changes: 1 addition & 1 deletion internal/prometheus/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"sync"

"github.com/prometheus/client_golang/prometheus"
proxmox "github.com/starttoaster/go-proxmox"
"github.com/starttoaster/proxmox-exporter/internal/logger"
wrappedProxmox "github.com/starttoaster/proxmox-exporter/internal/proxmox"
"github.com/starttoaster/proxmox-exporter/pkg/proxmox"
)

// collectNodeResponse is a struct wrapper for all metrics that need to be passed back for control flow,
Expand Down
2 changes: 1 addition & 1 deletion internal/prometheus/virtualmachine.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"

"github.com/prometheus/client_golang/prometheus"
"github.com/starttoaster/proxmox-exporter/pkg/proxmox"
proxmox "github.com/starttoaster/go-proxmox"
)

// collectVirtualMachineMetricsResponse is a struct wrapper for all VM metrics that need to be passed back for control flow,
Expand Down
2 changes: 1 addition & 1 deletion internal/proxmox/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/patrickmn/go-cache"
log "github.com/starttoaster/proxmox-exporter/internal/logger"

"github.com/starttoaster/proxmox-exporter/pkg/proxmox"
proxmox "github.com/starttoaster/go-proxmox"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion internal/proxmox/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package proxmox

import (
"github.com/patrickmn/go-cache"
proxmox "github.com/starttoaster/go-proxmox"
log "github.com/starttoaster/proxmox-exporter/internal/logger"
"github.com/starttoaster/proxmox-exporter/pkg/proxmox"
)

// GetClusterStatus returns a proxmox GetClusterStatusResponse object or an error from the /cluster/status endpoint
Expand Down
2 changes: 1 addition & 1 deletion internal/proxmox/nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"

"github.com/patrickmn/go-cache"
proxmox "github.com/starttoaster/go-proxmox"
log "github.com/starttoaster/proxmox-exporter/internal/logger"
"github.com/starttoaster/proxmox-exporter/pkg/proxmox"
)

// GetNodes returns a proxmox NodeStatuses object or an error from the /nodes endpoint
Expand Down
112 changes: 0 additions & 112 deletions pkg/proxmox/client.go

This file was deleted.

45 changes: 0 additions & 45 deletions pkg/proxmox/cluster.go

This file was deleted.

Loading

0 comments on commit e771460

Please sign in to comment.