Skip to content

Commit

Permalink
refactor: external clients for Sonarr, Radarr, Prowlarr and Transmission
Browse files Browse the repository at this point in the history
  • Loading branch information
clambin authored Sep 24, 2024
1 parent 6e2d0f6 commit 8903ede
Show file tree
Hide file tree
Showing 41 changed files with 1,389 additions and 940 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- master
- prowlarr
- openapi
paths-ignore:
- 'assets/**'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Test

on:
pull_request_target:
push:
branches-ignore:
- master
- prowlarr
pull_request_target:
- openapi

jobs:
test:
Expand Down
8 changes: 4 additions & 4 deletions .mockery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ packages:
IPLocator:
github.com/clambin/mediamon/v2/internal/collectors/transmission:
interfaces:
Getter:
TransmissionClient:
github.com/clambin/mediamon/v2/internal/collectors/xxxarr:
interfaces:
Client:
github.com/clambin/mediamon/v2/internal/collectors/prowlarr:
interfaces:
Client:
github.com/clambin/mediamon/v2/internal/collectors/xxxarr/clients:
interfaces:
RadarrClient:
SonarrClient:
github.com/clambin/mediamon/v2/internal/collectors/prowlarr:
interfaces:
ProwlarrClient:
File renamed without changes.
File renamed without changes.
12 changes: 9 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,33 +1,40 @@
module github.com/clambin/mediamon/v2

go 1.23.0
go 1.23

require (
github.com/clambin/breaker v0.4.0
github.com/clambin/go-common/charmer v0.2.0
github.com/clambin/go-common/http v0.6.0
github.com/clambin/go-common/set v0.4.3
github.com/clambin/mediaclients v0.5.1
github.com/clambin/mediaclients v0.6.1
github.com/hekmon/transmissionrpc/v3 v3.0.0
github.com/prometheus/client_golang v1.20.4
github.com/spf13/cobra v1.8.1
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.9.0
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0
golang.org/x/sync v0.8.0
)

require (
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/clambin/go-common/cache v0.7.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/google/uuid v1.5.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hekmon/cunits/v2 v2.1.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/oapi-codegen/runtime v1.1.1 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
Expand All @@ -43,7 +50,6 @@ require (
github.com/subosito/gotenv v1.6.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
Expand Down
24 changes: 20 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk=
github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ=
github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/clambin/breaker v0.4.0 h1:5F4GH2gr00JYMRm6TAnllB7raikg2dWnADbpDB82v6I=
Expand All @@ -14,8 +18,8 @@ github.com/clambin/go-common/set v0.4.3 h1:Sm9lkAJsh82j40RDpfQIziHyHjwr07+KsQF6v
github.com/clambin/go-common/set v0.4.3/go.mod h1:Q5GpBoM7B7abNV2Wzys+wQMInBHMoHyh/h0Cn2OmY4A=
github.com/clambin/go-common/testutils v0.1.0 h1:/nGWaOCIhW+Ew1c2NU7GLY/YPb8dp9SV8+MTgWksAgk=
github.com/clambin/go-common/testutils v0.1.0/go.mod h1:bV0j8D4zhNkleCeluFKLBeLQ0L/dqkxbaR/joLn8kzg=
github.com/clambin/mediaclients v0.5.1 h1:C2Hw3IjxXtS/ICAEKnKcyXauGtu0qa4AnWKCOQsQBtk=
github.com/clambin/mediaclients v0.5.1/go.mod h1:Wj0Nkp6ssC0o/HQz10rujWD1SETGXzom6P3/iatXNHw=
github.com/clambin/mediaclients v0.6.1 h1:xNvBZOYM4QrBuXCGmfdS/TRIVho7ji9U9Jg36JEYTNQ=
github.com/clambin/mediaclients v0.6.1/go.mod h1:6lODmPYY1n9M735hGOaV1/BDZVvsZzV2Lw3wjyWN+Ac=
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand All @@ -27,10 +31,19 @@ github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nos
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU=
github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hekmon/cunits/v2 v2.1.0 h1:k6wIjc4PlacNOHwKEMBgWV2/c8jyD4eRMs5mR1BBhI0=
github.com/hekmon/cunits/v2 v2.1.0/go.mod h1:9r1TycXYXaTmEWlAIfFV8JT+Xo59U96yUJAYHxzii2M=
github.com/hekmon/transmissionrpc/v3 v3.0.0 h1:0Fb11qE0IBh4V4GlOwHNYpqpjcYDp5GouolwrpmcUDQ=
github.com/hekmon/transmissionrpc/v3 v3.0.0/go.mod h1:38SlNhFzinVUuY87wGj3acOmRxeYZAZfrj6Re7UgCDg=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE=
github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA=
github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
Expand All @@ -45,6 +58,8 @@ github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyua
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/oapi-codegen/runtime v1.1.1 h1:EXLHh0DXIJnWhdRPN2w4MXAzFyE4CskzhNLUmtpMYro=
github.com/oapi-codegen/runtime v1.1.1/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg=
github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=
github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
Expand Down Expand Up @@ -77,6 +92,7 @@ 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.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI=
github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg=
github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0=
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 All @@ -94,8 +110,8 @@ go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI=
go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ=
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM=
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc=
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk=
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY=
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
Expand Down
8 changes: 4 additions & 4 deletions internal/cmd/mediamon/collectors.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,25 @@ var constructors = map[string]constructor{
"transmission.url": {
name: "transmission",
make: func(url, _ string, v *viper.Viper, logger *slog.Logger) (prometheus.Collector, error) {
return transmission.NewCollector(url, logger), nil
return transmission.NewCollector(url, logger)
},
},
"sonarr.url": {
name: "sonarr",
make: func(url, _ string, v *viper.Viper, logger *slog.Logger) (prometheus.Collector, error) {
return xxxarr.NewSonarrCollector(url, v.GetString("sonarr.apikey"), logger), nil
return xxxarr.NewSonarrCollector(url, v.GetString("sonarr.apikey"), logger)
},
},
"radarr.url": {
name: "radarr",
make: func(url, _ string, v *viper.Viper, logger *slog.Logger) (prometheus.Collector, error) {
return xxxarr.NewRadarrCollector(url, v.GetString("radarr.apikey"), logger), nil
return xxxarr.NewRadarrCollector(url, v.GetString("radarr.apikey"), logger)
},
},
"prowlarr.url": {
name: "prowlarr",
make: func(url, _ string, v *viper.Viper, logger *slog.Logger) (prometheus.Collector, error) {
return prowlarr.New(url, v.GetString("prowlarr.apikey"), logger), nil
return prowlarr.New(url, v.GetString("prowlarr.apikey"), logger)
},
},
"plex.url": {
Expand Down
2 changes: 1 addition & 1 deletion internal/collectors/connectivity/connectivity.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package connectivity
import (
"github.com/clambin/go-common/http/metrics"
"github.com/clambin/go-common/http/roundtripper"
"github.com/clambin/mediamon/v2/pkg/iplocator"
"github.com/clambin/mediamon/v2/iplocator"
"github.com/prometheus/client_golang/prometheus"
"log/slog"
"net/http"
Expand Down
2 changes: 1 addition & 1 deletion internal/collectors/connectivity/connectivity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"errors"
"github.com/clambin/mediamon/v2/internal/collectors/connectivity"
"github.com/clambin/mediamon/v2/internal/collectors/connectivity/mocks"
"github.com/clambin/mediamon/v2/pkg/iplocator"
"github.com/clambin/mediamon/v2/iplocator"
"github.com/prometheus/client_golang/prometheus/testutil"
"github.com/stretchr/testify/assert"
"log/slog"
Expand Down
4 changes: 2 additions & 2 deletions internal/collectors/connectivity/mocks/Locator.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/collectors/plex/libraries.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"
"github.com/clambin/mediaclients/plex"
collector_breaker "github.com/clambin/mediamon/v2/pkg/collector-breaker"
collectorbreaker "github.com/clambin/mediamon/v2/collector-breaker"
"github.com/prometheus/client_golang/prometheus"
"log/slog"
"sync"
Expand All @@ -26,7 +26,7 @@ var (
)
)

var _ collector_breaker.Collector = &libraryCollector{}
var _ collectorbreaker.Collector = &libraryCollector{}

type libraryCollector struct {
libraryGetter
Expand Down
6 changes: 3 additions & 3 deletions internal/collectors/plex/libraries_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package plex
import (
"errors"
"github.com/clambin/mediaclients/plex"
collectorbreaker "github.com/clambin/mediamon/v2/collector-breaker"
"github.com/clambin/mediamon/v2/internal/collectors/plex/mocks"
collectorBreaker "github.com/clambin/mediamon/v2/pkg/collector-breaker"
"github.com/prometheus/client_golang/prometheus/testutil"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
Expand Down Expand Up @@ -158,7 +158,7 @@ mediamon_plex_library_count{library="shows",url="http://localhost:8080"} 0
logger: slog.Default(),
}
assert.NoError(t, testutil.CollectAndCompare(
collectorBreaker.PassThroughCollector{Collector: &c},
collectorbreaker.PassThroughCollector{Collector: &c},
strings.NewReader(tt.want),
))
})
Expand All @@ -178,7 +178,7 @@ func TestLibraryCollector_Collect_cached(t *testing.T) {
url: "http://localhost:8080",
logger: slog.Default(),
}
cb := collectorBreaker.PassThroughCollector{Collector: &c}
cb := collectorbreaker.PassThroughCollector{Collector: &c}
assert.NotZero(t, testutil.CollectAndCount(cb))
assert.NotZero(t, testutil.CollectAndCount(cb))
}
2 changes: 1 addition & 1 deletion internal/collectors/plex/mocks/Getter.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/collectors/plex/mocks/IPLocator.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions internal/collectors/plex/plex.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"github.com/clambin/go-common/http/metrics"
"github.com/clambin/go-common/http/roundtripper"
"github.com/clambin/mediaclients/plex"
collectorBreaker "github.com/clambin/mediamon/v2/pkg/collector-breaker"
"github.com/clambin/mediamon/v2/pkg/iplocator"
collectorbreaker "github.com/clambin/mediamon/v2/collector-breaker"
"github.com/clambin/mediamon/v2/iplocator"
"github.com/prometheus/client_golang/prometheus"
"golang.org/x/sync/errgroup"
"log/slog"
Expand Down Expand Up @@ -35,7 +35,7 @@ type IPLocator interface {
Locate(string) (iplocator.Location, error)
}

var _ collectorBreaker.Collector = &Collector{}
var _ collectorbreaker.Collector = &Collector{}

// Config to create a Collector
type Config struct {
Expand All @@ -45,7 +45,7 @@ type Config struct {
}

// NewCollector creates a new Collector
func NewCollector(version, url, username, password string, logger *slog.Logger) *collectorBreaker.CBCollector {
func NewCollector(version, url, username, password string, logger *slog.Logger) *collectorbreaker.CBCollector {
m := metrics.NewRequestMetrics(metrics.Options{
Namespace: "mediamon",
ConstLabels: prometheus.Labels{"application": "plex"},
Expand Down Expand Up @@ -81,7 +81,7 @@ func NewCollector(version, url, username, password string, logger *slog.Logger)
metrics: m,
logger: logger,
}
return collectorBreaker.New("plex", &c, logger)
return collectorbreaker.New("plex", &c, logger)
}

func chopPath(r *http.Request) *http.Request {
Expand Down
4 changes: 2 additions & 2 deletions internal/collectors/plex/sessions.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"github.com/clambin/go-common/set"
"github.com/clambin/mediaclients/plex"
collector_breaker "github.com/clambin/mediamon/v2/pkg/collector-breaker"
collectorbreaker "github.com/clambin/mediamon/v2/collector-breaker"
"github.com/prometheus/client_golang/prometheus"
"log/slog"
"math"
Expand Down Expand Up @@ -43,7 +43,7 @@ var (
)
)

var _ collector_breaker.Collector = sessionCollector{}
var _ collectorbreaker.Collector = sessionCollector{}

type sessionCollector struct {
sessionGetter
Expand Down
4 changes: 2 additions & 2 deletions internal/collectors/plex/sessions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package plex

import (
"github.com/clambin/mediaclients/plex"
collectorbreaker "github.com/clambin/mediamon/v2/collector-breaker"
"github.com/clambin/mediamon/v2/internal/collectors/plex/mocks"
collectorbreaker "github.com/clambin/mediamon/v2/pkg/collector-breaker"
"github.com/clambin/mediamon/v2/pkg/iplocator"
"github.com/clambin/mediamon/v2/iplocator"
"github.com/prometheus/client_golang/prometheus/testutil"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
Expand Down
4 changes: 2 additions & 2 deletions internal/collectors/plex/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"
"github.com/clambin/mediaclients/plex"
collector_breaker "github.com/clambin/mediamon/v2/pkg/collector-breaker"
collectorbreaker "github.com/clambin/mediamon/v2/collector-breaker"
"github.com/prometheus/client_golang/prometheus"
"log/slog"
)
Expand All @@ -16,7 +16,7 @@ var versionMetric = prometheus.NewDesc(
nil,
)

var _ collector_breaker.Collector = versionCollector{}
var _ collectorbreaker.Collector = versionCollector{}

type versionCollector struct {
identityGetter
Expand Down
2 changes: 1 addition & 1 deletion internal/collectors/plex/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package plex
import (
"bytes"
"github.com/clambin/mediaclients/plex"
collectorbreaker "github.com/clambin/mediamon/v2/collector-breaker"
"github.com/clambin/mediamon/v2/internal/collectors/plex/mocks"
collectorbreaker "github.com/clambin/mediamon/v2/pkg/collector-breaker"
"github.com/prometheus/client_golang/prometheus/testutil"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
Expand Down
Loading

0 comments on commit 8903ede

Please sign in to comment.