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

Commit75de15b

Browse files
committed
migrate to coder/websocket 1.8.12
1 parentbadebc7 commit75de15b

34 files changed

+98
-160
lines changed

‎coderd/healthcheck/websocket.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import (
1010
"time"
1111

1212
"golang.org/x/xerrors"
13-
"nhooyr.io/websocket"
1413

1514
"github.com/coder/coder/v2/coderd/healthcheck/health"
1615
"github.com/coder/coder/v2/codersdk/healthsdk"
16+
"github.com/coder/websocket"
1717
)
1818

1919
typeWebsocketReport healthsdk.WebsocketReport

‎coderd/httpapi/httpapi.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ const websocketCloseMaxLen = 123
268268
funcWebsocketCloseSprintf(formatstring,vars...any)string {
269269
msg:=fmt.Sprintf(format,vars...)
270270

271-
// Cap msg length at 123 bytes.nhooyr/websocket only allows close messages
271+
// Cap msg length at 123 bytes.coder/websocket only allows close messages
272272
// of this length.
273273
iflen(msg)>websocketCloseMaxLen {
274274
// Trim the string to 123 bytes. If we accidentally cut in the middle of

‎coderd/httpapi/websocket.go‎

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

88
"golang.org/x/xerrors"
9-
"nhooyr.io/websocket"
109

1110
"cdr.dev/slog"
11+
"github.com/coder/websocket"
1212
)
1313

1414
// Heartbeat loops to ping a WebSocket to keep it alive.

‎coderd/provisionerjobs.go‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,17 @@ import (
1212

1313
"github.com/google/uuid"
1414
"golang.org/x/xerrors"
15-
"nhooyr.io/websocket"
1615

1716
"cdr.dev/slog"
18-
"github.com/coder/coder/v2/codersdk/wsjson"
19-
2017
"github.com/coder/coder/v2/coderd/database"
2118
"github.com/coder/coder/v2/coderd/database/db2sdk"
2219
"github.com/coder/coder/v2/coderd/database/dbauthz"
2320
"github.com/coder/coder/v2/coderd/database/pubsub"
2421
"github.com/coder/coder/v2/coderd/httpapi"
2522
"github.com/coder/coder/v2/codersdk"
23+
"github.com/coder/coder/v2/codersdk/wsjson"
2624
"github.com/coder/coder/v2/provisionersdk"
25+
"github.com/coder/websocket"
2726
)
2827

2928
// Returns provisioner logs based on query parameters.

‎coderd/provisionerjobs_internal_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import (
1414
"github.com/stretchr/testify/assert"
1515
"github.com/stretchr/testify/require"
1616
"go.uber.org/mock/gomock"
17-
"nhooyr.io/websocket"
1817

1918
"github.com/coder/coder/v2/coderd/database"
2019
"github.com/coder/coder/v2/coderd/database/dbmock"
@@ -23,6 +22,7 @@ import (
2322
"github.com/coder/coder/v2/codersdk"
2423
"github.com/coder/coder/v2/provisionersdk"
2524
"github.com/coder/coder/v2/testutil"
25+
"github.com/coder/websocket"
2626
)
2727

2828
funcTestConvertProvisionerJob_Unit(t*testing.T) {

‎coderd/workspaceagents.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import (
2020
"golang.org/x/exp/slices"
2121
"golang.org/x/sync/errgroup"
2222
"golang.org/x/xerrors"
23-
"nhooyr.io/websocket"
2423
"tailscale.com/tailcfg"
2524

2625
"cdr.dev/slog"
@@ -42,6 +41,7 @@ import (
4241
"github.com/coder/coder/v2/codersdk/wsjson"
4342
"github.com/coder/coder/v2/tailnet"
4443
"github.com/coder/coder/v2/tailnet/proto"
44+
"github.com/coder/websocket"
4545
)
4646

4747
// @Summary Get workspace agent by ID
@@ -378,7 +378,7 @@ func (api *API) workspaceAgentLogs(rw http.ResponseWriter, r *http.Request) {
378378

379379
// Allow client to request no compression. This is useful for buggy
380380
// clients or if there's a client/server incompatibility. This is
381-
// needed with e.g.nhooyr/websocket and Safari (confirmed in 16.5).
381+
// needed with e.g.coder/websocket and Safari (confirmed in 16.5).
382382
//
383383
// See:
384384
// * https://github.com/nhooyr/websocket/issues/218

‎coderd/workspaceagents_test.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import (
2020
"github.com/stretchr/testify/require"
2121
"golang.org/x/xerrors"
2222
"google.golang.org/protobuf/types/known/timestamppb"
23-
"nhooyr.io/websocket"
2423
"tailscale.com/tailcfg"
2524

2625
"cdr.dev/slog"
@@ -50,6 +49,7 @@ import (
5049
"github.com/coder/coder/v2/tailnet/tailnettest"
5150
"github.com/coder/coder/v2/testutil"
5251
"github.com/coder/quartz"
52+
"github.com/coder/websocket"
5353
)
5454

5555
funcTestWorkspaceAgent(t*testing.T) {
@@ -2058,7 +2058,7 @@ type workspace struct {
20582058

20592059
funcwaitForUpdates(
20602060
t*testing.T,
2061-
//nolint:revive // t takes precedence
2061+
//nolint:revive // t takes precedence
20622062
ctx context.Context,
20632063
stream tailnetproto.DRPCTailnet_WorkspaceUpdatesClient,
20642064
currentStatemap[uuid.UUID]workspace,

‎coderd/workspaceagentsrpc.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import (
1414
"github.com/google/uuid"
1515
"github.com/hashicorp/yamux"
1616
"golang.org/x/xerrors"
17-
"nhooyr.io/websocket"
1817

1918
"cdr.dev/slog"
2019
"github.com/coder/coder/v2/agent/proto"
@@ -30,6 +29,7 @@ import (
3029
"github.com/coder/coder/v2/codersdk"
3130
"github.com/coder/coder/v2/tailnet"
3231
tailnetproto"github.com/coder/coder/v2/tailnet/proto"
32+
"github.com/coder/websocket"
3333
)
3434

3535
// @Summary Workspace agent RPC API

‎coderd/workspaceagentsrpc_internal_test.go‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,17 @@ import (
88
"testing"
99
"time"
1010

11-
"github.com/coder/coder/v2/coderd/util/ptr"
12-
"github.com/coder/coder/v2/coderd/wspubsub"
13-
1411
"github.com/google/uuid"
1512
"github.com/stretchr/testify/require"
1613
"go.uber.org/mock/gomock"
17-
"nhooyr.io/websocket"
1814

1915
"github.com/coder/coder/v2/coderd/database"
2016
"github.com/coder/coder/v2/coderd/database/dbmock"
2117
"github.com/coder/coder/v2/coderd/database/dbtime"
18+
"github.com/coder/coder/v2/coderd/util/ptr"
19+
"github.com/coder/coder/v2/coderd/wspubsub"
2220
"github.com/coder/coder/v2/testutil"
21+
"github.com/coder/websocket"
2322
)
2423

2524
funcTestAgentConnectionMonitor_ContextCancel(t*testing.T) {

‎coderd/workspaceapps/proxy.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
"github.com/go-jose/go-jose/v4/jwt"
1818
"github.com/google/uuid"
1919
"go.opentelemetry.io/otel/trace"
20-
"nhooyr.io/websocket"
2120

2221
"cdr.dev/slog"
2322
"github.com/coder/coder/v2/agent/agentssh"
@@ -32,6 +31,7 @@ import (
3231
"github.com/coder/coder/v2/codersdk"
3332
"github.com/coder/coder/v2/codersdk/workspacesdk"
3433
"github.com/coder/coder/v2/site"
34+
"github.com/coder/websocket"
3535
)
3636

3737
const (

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp