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

Commit358017a

Browse files
committed
Update client.go
1 parent7e73827 commit358017a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

‎codersdk/agentsdk/agentsdk.go‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ var ExternalLogSourceID = uuid.MustParse("3b579bf4-1ed8-4b99-87a8-e9a1e3410410")
4545
// @typescript-ignore SessionTokenSetup
4646
typeSessionTokenSetupfunc(client*codersdk.Client)RefreshableSessionTokenProvider
4747

48+
// New creates a new *Client which can be used by an agent to connect to Coderd. Use a SessionTokenSetup function
49+
// to define the session token provider for the Client. This overrides the SessionTokenProvider on the underlying
50+
// `*codersdk.Client`, so any `codersdk.ClientOptions` passed as `opts` should not set this property.
4851
funcNew(serverURL*url.URL,setupSessionTokenSetup,opts...codersdk.ClientOption)*Client {
4952
varproviderRefreshableSessionTokenProvider
5053
opts=append(opts,func(c*codersdk.Client) {

‎codersdk/client.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ func (c *Client) SessionToken() string {
188188
}
189189

190190
// SetSessionToken sets a fixed token for the client.
191-
// Deprecated:Build a new client using WithSessionToken instead of changing the token after creation.
191+
// Deprecated:Create a new client using WithSessionToken instead of changing the token after creation.
192192
func (c*Client)SetSessionToken(tokenstring) {
193193
c.mu.Lock()
194194
deferc.mu.Unlock()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp