Skip to content

Commit 5a24f7a

Browse files
committed
Refactor
Signed-off-by: Danny Kopping <danny@coder.com>
1 parent 9536ecc commit 5a24f7a

File tree

3 files changed

+5
-36
lines changed

3 files changed

+5
-36
lines changed

cli/server.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ import (
5555

5656
"cdr.dev/slog"
5757
"cdr.dev/slog/sloggers/sloghuman"
58+
5859
"github.com/coder/coder/v2/coderd/entitlements"
60+
"github.com/coder/coder/v2/coderd/runtimeconfig"
61+
5962
"github.com/coder/pretty"
6063
"github.com/coder/quartz"
6164
"github.com/coder/retry"
@@ -820,7 +823,7 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
820823
return err
821824
}
822825

823-
runtimeCfg := coderd.NewRuntimeConfigStore(options.Database)
826+
runtimeCfg := runtimeconfig.NewStoreManager(options.Database)
824827

825828
// This should be output before the logs start streaming.
826829
cliui.Infof(inv.Stdout, "\n==> Logs will stream in below (press ctrl+c to gracefully exit):")

coderd/notifications/dispatch/webhook_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import (
1818
"cdr.dev/slog"
1919
"cdr.dev/slog/sloggers/slogtest"
2020

21-
"github.com/coder/coder/v2/coderd"
2221
"github.com/coder/coder/v2/coderd/coderdtest"
2322
"github.com/coder/coder/v2/coderd/database/dbmem"
2423
"github.com/coder/coder/v2/coderd/notifications/dispatch"
@@ -191,7 +190,7 @@ func TestRuntimeEndpointChange(t *testing.T) {
191190
})
192191

193192
// Setup runtime config manager.
194-
mgr := coderd.NewRuntimeConfigStore(dbmem.New())
193+
mgr := runtimeconfig.NewStoreManager(dbmem.New())
195194

196195
// Dispatch a notification and it will fail.
197196
handler := dispatch.NewWebhookHandler(vals.Notifications.Webhook, logger.With(slog.F("test", t.Name())))

coderd/runtimeconfig.go

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)