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
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
/coder-v1-cliPublic archive

Commit6f1e4ab

Browse files
committed
fix outdated references
1 parentf8b26db commit6f1e4ab

File tree

6 files changed

+23
-11
lines changed

6 files changed

+23
-11
lines changed

‎go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ require (
2828
github.com/rjeczalik/notifyv0.9.2
2929
github.com/spf13/cobrav1.2.1
3030
github.com/stretchr/testifyv1.7.0
31+
go.uber.org/goleakv1.1.12// indirect
3132
golang.org/x/cryptov0.0.0-20210817164053-32db794688a5// indirect
3233
golang.org/x/netv0.0.0-20210913180222-943fd674d43e
3334
golang.org/x/syncv0.0.0-20210220032951-036812b2e83c

‎go.sum

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,8 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
422422
go.opencensus.iov0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=
423423
go.opencensus.iov0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
424424
go.uber.org/atomicv1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
425+
go.uber.org/goleakv1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA=
426+
go.uber.org/goleakv1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
425427
go.uber.org/multierrv1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
426428
go.uber.org/zapv1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
427429
golang.org/x/cryptov0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
@@ -667,6 +669,7 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f
667669
golang.org/x/toolsv0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
668670
golang.org/x/toolsv0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
669671
golang.org/x/toolsv0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
672+
golang.org/x/toolsv0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
670673
golang.org/x/xerrorsv0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
671674
golang.org/x/xerrorsv0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
672675
golang.org/x/xerrorsv0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

‎internal/cmd/tunnel.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ func (c *tunnneler) start(ctx context.Context) error {
117117
&wsnet.DialOptions{
118118
Log:&dialLog,
119119
TURNProxyAuthToken:c.token,
120-
TURNProxyURL:c.brokerAddr,
120+
TURNRemoteProxyURL:c.brokerAddr,
121+
TURNLocalProxyURL:c.brokerAddr,
121122
ICEServers: []webrtc.ICEServer{wsnet.TURNProxyICECandidate()},
122123
},
123124
nil,

‎wsnet/conn.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"github.com/pion/webrtc/v3"
1515
"nhooyr.io/websocket"
1616

17-
"coder.com/m/product/coder/pkg/codersdk/legacy"
17+
"cdr.dev/coder-cli/coder-sdk"
1818
)
1919

2020
const (
@@ -89,7 +89,7 @@ func (t *turnProxyDialer) Dial(_, _ string) (c net.Conn, err error) {
8989
iferr!=nil {
9090
ifresp!=nil {
9191
deferresp.Body.Close()
92-
returnnil,legacy.NewHTTPError(resp)
92+
returnnil,coder.NewHTTPError(resp)
9393
}
9494
returnnil,fmt.Errorf("dial: %w",err)
9595
}

‎wsnet/dial.go

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@ import (
1515
"github.com/pion/webrtc/v3"
1616
"golang.org/x/net/proxy"
1717
"golang.org/x/xerrors"
18-
"k8s.io/utils/pointer"
1918
"nhooyr.io/websocket"
2019

20+
"cdr.dev/coder-cli/coder-sdk"
2121
"cdr.dev/slog"
22-
"coder.com/m/product/coder/pkg/codersdk/legacy"
2322
)
2423

2524
// DialOptions are configurable options for a wsnet connection.
@@ -61,7 +60,7 @@ func DialWebsocket(ctx context.Context, broker string, netOpts *DialOptions, wsO
6160
deferfunc() {
6261
_=resp.Body.Close()
6362
}()
64-
returnnil,legacy.NewHTTPError(resp)
63+
returnnil,coder.NewHTTPError(resp)
6564
}
6665
returnnil,fmt.Errorf("dial websocket: %w",err)
6766
}
@@ -129,8 +128,8 @@ func Dial(ctx context.Context, conn net.Conn, options *DialOptions) (*Dialer, er
129128

130129
log.Debug(ctx,"creating control channel",slog.F("proto",controlChannel))
131130
ctrl,err:=rtc.CreateDataChannel(controlChannel,&webrtc.DataChannelInit{
132-
Protocol:pointer.String(controlChannel),
133-
Ordered:pointer.Bool(true),
131+
Protocol:strptr(controlChannel),
132+
Ordered:boolptr(true),
134133
})
135134
iferr!=nil {
136135
returnnil,fmt.Errorf("create control channel: %w",err)
@@ -386,7 +385,7 @@ func (d *Dialer) DialContext(ctx context.Context, network, address string) (net.
386385

387386
d.log.Debug(ctx,"opening data channel")
388387
dc,err:=d.rtc.CreateDataChannel("proxy",&webrtc.DataChannelInit{
389-
Ordered:pointer.Bool(network!="udp"),
388+
Ordered:boolptr(network!="udp"),
390389
Protocol:&proto,
391390
})
392391
iferr!=nil {
@@ -463,3 +462,11 @@ func (d *Dialer) DialContext(ctx context.Context, network, address string) (net.
463462
d.log.Debug(ctx,"dial channel ready")
464463
returnc,nil
465464
}
465+
466+
funcboolptr(bbool)*bool {
467+
return&b
468+
}
469+
470+
funcstrptr(sstring)*string {
471+
return&s
472+
}

‎wsnet/listen.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import (
1818
"golang.org/x/xerrors"
1919
"nhooyr.io/websocket"
2020

21+
"cdr.dev/coder-cli/coder-sdk"
2122
"cdr.dev/slog"
22-
"coder.com/m/product/coder/pkg/codersdk/legacy"
2323
)
2424

2525
// Codes for DialChannelResponse.
@@ -133,7 +133,7 @@ func (l *listener) dial(ctx context.Context) (<-chan error, error) {
133133
conn,resp,err:=websocket.Dial(ctx,l.broker,nil)
134134
iferr!=nil {
135135
ifresp!=nil {
136-
returnnil,legacy.NewHTTPError(resp)
136+
returnnil,coder.NewHTTPError(resp)
137137
}
138138
returnnil,err
139139
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp