Skip to content

Commit

Permalink
Move startstop package up to root of ./internal/ (#419)
Browse files Browse the repository at this point in the history
A very small change that's been on my list for a while, but I didn't do
because it'd be conflicting with some other branches I had: move the
`startstop` package up to root of `./internal/`. Until now it's been in
`./internal/maintenance` because it was originally only used for
maintenance services, but since it's now used much more widely, it makes
more sense for it to live in `./internal`.
  • Loading branch information
brandur authored Jul 4, 2024
1 parent cd27ea6 commit cfe1b10
Show file tree
Hide file tree
Showing 21 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import (
"github.com/riverqueue/river/internal/jobcompleter"
"github.com/riverqueue/river/internal/leadership"
"github.com/riverqueue/river/internal/maintenance"
"github.com/riverqueue/river/internal/maintenance/startstop"
"github.com/riverqueue/river/internal/notifier"
"github.com/riverqueue/river/internal/notifylimiter"
"github.com/riverqueue/river/internal/rivercommon"
"github.com/riverqueue/river/internal/startstop"
"github.com/riverqueue/river/internal/util/maputil"
"github.com/riverqueue/river/internal/util/randutil"
"github.com/riverqueue/river/internal/util/sliceutil"
Expand Down
2 changes: 1 addition & 1 deletion client_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"sync"

"github.com/riverqueue/river/internal/componentstatus"
"github.com/riverqueue/river/internal/maintenance/startstop"
"github.com/riverqueue/river/internal/startstop"
)

type clientMonitor struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/jobcompleter/job_completer.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/riverqueue/river/internal/baseservice"
"github.com/riverqueue/river/internal/jobstats"
"github.com/riverqueue/river/internal/maintenance/startstop"
"github.com/riverqueue/river/internal/startstop"
"github.com/riverqueue/river/internal/util/sliceutil"
"github.com/riverqueue/river/riverdriver"
"github.com/riverqueue/river/rivertype"
Expand Down
2 changes: 1 addition & 1 deletion internal/jobcompleter/job_completer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import (
"github.com/stretchr/testify/require"

"github.com/riverqueue/river/internal/jobstats"
"github.com/riverqueue/river/internal/maintenance/startstop"
"github.com/riverqueue/river/internal/rivercommon"
"github.com/riverqueue/river/internal/riverinternaltest"
"github.com/riverqueue/river/internal/riverinternaltest/testfactory"
"github.com/riverqueue/river/internal/startstop"
"github.com/riverqueue/river/internal/util/ptrutil"
"github.com/riverqueue/river/riverdriver"
"github.com/riverqueue/river/riverdriver/riverpgxv5"
Expand Down
2 changes: 1 addition & 1 deletion internal/leadership/elector.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"time"

"github.com/riverqueue/river/internal/baseservice"
"github.com/riverqueue/river/internal/maintenance/startstop"
"github.com/riverqueue/river/internal/notifier"
"github.com/riverqueue/river/internal/rivercommon"
"github.com/riverqueue/river/internal/startstop"
"github.com/riverqueue/river/internal/util/dbutil"
"github.com/riverqueue/river/internal/util/valutil"
"github.com/riverqueue/river/riverdriver"
Expand Down
2 changes: 1 addition & 1 deletion internal/maintenance/job_cleaner.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"time"

"github.com/riverqueue/river/internal/baseservice"
"github.com/riverqueue/river/internal/maintenance/startstop"
"github.com/riverqueue/river/internal/rivercommon"
"github.com/riverqueue/river/internal/startstop"
"github.com/riverqueue/river/internal/util/timeutil"
"github.com/riverqueue/river/internal/util/valutil"
"github.com/riverqueue/river/riverdriver"
Expand Down
2 changes: 1 addition & 1 deletion internal/maintenance/job_rescuer.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"time"

"github.com/riverqueue/river/internal/baseservice"
"github.com/riverqueue/river/internal/maintenance/startstop"
"github.com/riverqueue/river/internal/rivercommon"
"github.com/riverqueue/river/internal/startstop"
"github.com/riverqueue/river/internal/util/ptrutil"
"github.com/riverqueue/river/internal/util/timeutil"
"github.com/riverqueue/river/internal/util/valutil"
Expand Down
2 changes: 1 addition & 1 deletion internal/maintenance/job_scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"time"

"github.com/riverqueue/river/internal/baseservice"
"github.com/riverqueue/river/internal/maintenance/startstop"
"github.com/riverqueue/river/internal/rivercommon"
"github.com/riverqueue/river/internal/startstop"
"github.com/riverqueue/river/internal/util/timeutil"
"github.com/riverqueue/river/internal/util/valutil"
"github.com/riverqueue/river/riverdriver"
Expand Down
2 changes: 1 addition & 1 deletion internal/maintenance/periodic_job_enqueuer.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (

"github.com/riverqueue/river/internal/baseservice"
"github.com/riverqueue/river/internal/dbunique"
"github.com/riverqueue/river/internal/maintenance/startstop"
"github.com/riverqueue/river/internal/rivercommon"
"github.com/riverqueue/river/internal/startstop"
"github.com/riverqueue/river/internal/util/maputil"
"github.com/riverqueue/river/riverdriver"
"github.com/riverqueue/river/rivertype"
Expand Down
2 changes: 1 addition & 1 deletion internal/maintenance/periodic_job_enqueuer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"github.com/stretchr/testify/require"

"github.com/riverqueue/river/internal/dbunique"
"github.com/riverqueue/river/internal/maintenance/startstop"
"github.com/riverqueue/river/internal/rivercommon"
"github.com/riverqueue/river/internal/riverinternaltest"
"github.com/riverqueue/river/internal/riverinternaltest/startstoptest"
"github.com/riverqueue/river/internal/startstop"
"github.com/riverqueue/river/internal/util/randutil"
"github.com/riverqueue/river/riverdriver"
"github.com/riverqueue/river/riverdriver/riverpgxv5"
Expand Down
2 changes: 1 addition & 1 deletion internal/maintenance/queue_cleaner.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"time"

"github.com/riverqueue/river/internal/baseservice"
"github.com/riverqueue/river/internal/maintenance/startstop"
"github.com/riverqueue/river/internal/rivercommon"
"github.com/riverqueue/river/internal/startstop"
"github.com/riverqueue/river/internal/util/timeutil"
"github.com/riverqueue/river/internal/util/valutil"
"github.com/riverqueue/river/riverdriver"
Expand Down
2 changes: 1 addition & 1 deletion internal/maintenance/queue_maintainer.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"time"

"github.com/riverqueue/river/internal/baseservice"
"github.com/riverqueue/river/internal/maintenance/startstop"
"github.com/riverqueue/river/internal/startstop"
"github.com/riverqueue/river/internal/util/maputil"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/maintenance/queue_maintainer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (

"github.com/riverqueue/river/internal/baseservice"
"github.com/riverqueue/river/internal/dbunique"
"github.com/riverqueue/river/internal/maintenance/startstop"
"github.com/riverqueue/river/internal/rivercommon"
"github.com/riverqueue/river/internal/riverinternaltest"
"github.com/riverqueue/river/internal/riverinternaltest/sharedtx"
"github.com/riverqueue/river/internal/riverinternaltest/startstoptest"
"github.com/riverqueue/river/internal/startstop"
"github.com/riverqueue/river/riverdriver"
"github.com/riverqueue/river/riverdriver/riverpgxv5"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/maintenance/reindexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"time"

"github.com/riverqueue/river/internal/baseservice"
"github.com/riverqueue/river/internal/maintenance/startstop"
"github.com/riverqueue/river/internal/rivercommon"
"github.com/riverqueue/river/internal/startstop"
"github.com/riverqueue/river/internal/util/valutil"
"github.com/riverqueue/river/riverdriver"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/notifier/notifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (

"github.com/riverqueue/river/internal/baseservice"
"github.com/riverqueue/river/internal/componentstatus"
"github.com/riverqueue/river/internal/maintenance/startstop"
"github.com/riverqueue/river/internal/rivercommon"
"github.com/riverqueue/river/internal/startstop"
"github.com/riverqueue/river/internal/util/maputil"
"github.com/riverqueue/river/internal/util/sliceutil"
"github.com/riverqueue/river/riverdriver"
Expand Down
2 changes: 1 addition & 1 deletion internal/riverinternaltest/startstoptest/startstoptest.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/stretchr/testify/require"

"github.com/riverqueue/river/internal/maintenance/startstop"
"github.com/riverqueue/river/internal/startstop"
)

// Stress is a test helper that puts stress on a service's start and stop
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (

"github.com/stretchr/testify/require"

"github.com/riverqueue/river/internal/maintenance/startstop"
"github.com/riverqueue/river/internal/riverinternaltest"
"github.com/riverqueue/river/internal/startstop"
)

type MyService struct {
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"github.com/riverqueue/river/internal/baseservice"
"github.com/riverqueue/river/internal/componentstatus"
"github.com/riverqueue/river/internal/jobcompleter"
"github.com/riverqueue/river/internal/maintenance/startstop"
"github.com/riverqueue/river/internal/notifier"
"github.com/riverqueue/river/internal/rivercommon"
"github.com/riverqueue/river/internal/startstop"
"github.com/riverqueue/river/internal/util/chanutil"
"github.com/riverqueue/river/internal/workunit"
"github.com/riverqueue/river/riverdriver"
Expand Down
2 changes: 1 addition & 1 deletion subscription_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/riverqueue/river/internal/baseservice"
"github.com/riverqueue/river/internal/jobcompleter"
"github.com/riverqueue/river/internal/jobstats"
"github.com/riverqueue/river/internal/maintenance/startstop"
"github.com/riverqueue/river/internal/startstop"
"github.com/riverqueue/river/internal/util/sliceutil"
"github.com/riverqueue/river/rivertype"
)
Expand Down

0 comments on commit cfe1b10

Please sign in to comment.