Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8e3770e

Browse files
committed
chore: rename package autostart/lifecycle to lifecycle/executor
1 parent5dff2ac commit8e3770e

File tree

9 files changed

+13
-14
lines changed

9 files changed

+13
-14
lines changed

‎cli/autostart.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
"github.com/spf13/cobra"
99

10-
"github.com/coder/coder/coderd/autostart/schedule"
10+
"github.com/coder/coder/coderd/lifecycle/schedule"
1111
"github.com/coder/coder/codersdk"
1212
)
1313

‎cli/autostop.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
"github.com/spf13/cobra"
99

10-
"github.com/coder/coder/coderd/autostart/schedule"
10+
"github.com/coder/coder/coderd/lifecycle/schedule"
1111
"github.com/coder/coder/codersdk"
1212
)
1313

‎coderd/coderdtest/coderdtest.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ import (
2424
"testing"
2525
"time"
2626

27-
"github.com/coder/coder/coderd/autostart/lifecycle"
28-
2927
"cloud.google.com/go/compute/metadata"
3028
"github.com/fullsailor/pkcs7"
3129
"github.com/golang-jwt/jwt"
@@ -43,6 +41,7 @@ import (
4341
"github.com/coder/coder/coderd/database/databasefake"
4442
"github.com/coder/coder/coderd/database/postgres"
4543
"github.com/coder/coder/coderd/gitsshkey"
44+
"github.com/coder/coder/coderd/lifecycle/executor"
4645
"github.com/coder/coder/coderd/turnconn"
4746
"github.com/coder/coder/codersdk"
4847
"github.com/coder/coder/cryptorand"
@@ -105,7 +104,7 @@ func New(t *testing.T, options *Options) *codersdk.Client {
105104
}
106105

107106
ctx,cancelFunc:=context.WithCancel(context.Background())
108-
lifecycleExecutor:=lifecycle.NewExecutor(
107+
lifecycleExecutor:=executor.New(
109108
ctx,
110109
db,
111110
slogtest.Make(t,nil).Named("lifecycle.executor").Leveled(slog.LevelDebug),

‎coderd/autostart/lifecycle/lifecycle_executor.gorenamed to‎coderd/lifecycle/executor/lifecycle_executor.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
packagelifecycle
1+
packageexecutor
22

33
import (
44
"context"
@@ -7,8 +7,8 @@ import (
77

88
"cdr.dev/slog"
99

10-
"github.com/coder/coder/coderd/autostart/schedule"
1110
"github.com/coder/coder/coderd/database"
11+
"github.com/coder/coder/coderd/lifecycle/schedule"
1212

1313
"github.com/google/uuid"
1414
"github.com/moby/moby/pkg/namesgenerator"
@@ -23,8 +23,8 @@ type Executor struct {
2323
tick<-chan time.Time
2424
}
2525

26-
//NewExecutor returns a newinstance of Executor.
27-
funcNewExecutor(ctx context.Context,db database.Store,log slog.Logger,tick<-chan time.Time)*Executor {
26+
//New returns a newlifecycle executor.
27+
funcNew(ctx context.Context,db database.Store,log slog.Logger,tick<-chan time.Time)*Executor {
2828
le:=&Executor{
2929
ctx:ctx,
3030
db:db,

‎coderd/autostart/lifecycle/lifecycle_executor_test.gorenamed to‎coderd/lifecycle/executor/lifecycle_executor_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
packagelifecycle_test
1+
packageexecutor_test
22

33
import (
44
"context"
55
"testing"
66
"time"
77

8-
"github.com/coder/coder/coderd/autostart/schedule"
98
"github.com/coder/coder/coderd/coderdtest"
109
"github.com/coder/coder/coderd/database"
10+
"github.com/coder/coder/coderd/lifecycle/schedule"
1111
"github.com/coder/coder/codersdk"
1212

1313
"github.com/google/uuid"

‎coderd/autostart/schedule/schedule_test.gorenamed to‎coderd/lifecycle/schedule/schedule_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
"github.com/stretchr/testify/require"
88

9-
"github.com/coder/coder/coderd/autostart/schedule"
9+
"github.com/coder/coder/coderd/lifecycle/schedule"
1010
)
1111

1212
funcTest_Weekly(t*testing.T) {

‎coderd/workspaces.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import (
1313
"github.com/moby/moby/pkg/namesgenerator"
1414
"golang.org/x/xerrors"
1515

16-
"github.com/coder/coder/coderd/autostart/schedule"
1716
"github.com/coder/coder/coderd/database"
1817
"github.com/coder/coder/coderd/httpapi"
1918
"github.com/coder/coder/coderd/httpmw"
19+
"github.com/coder/coder/coderd/lifecycle/schedule"
2020
"github.com/coder/coder/codersdk"
2121
)
2222

‎coderd/workspaces_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import (
1010
"github.com/google/uuid"
1111
"github.com/stretchr/testify/require"
1212

13-
"github.com/coder/coder/coderd/autostart/schedule"
1413
"github.com/coder/coder/coderd/coderdtest"
1514
"github.com/coder/coder/coderd/database"
15+
"github.com/coder/coder/coderd/lifecycle/schedule"
1616
"github.com/coder/coder/codersdk"
1717
"github.com/coder/coder/provisioner/echo"
1818
"github.com/coder/coder/provisionersdk/proto"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp