We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent7e73827 commit358017aCopy full SHA for 358017a
codersdk/agentsdk/agentsdk.go
@@ -45,6 +45,9 @@ var ExternalLogSourceID = uuid.MustParse("3b579bf4-1ed8-4b99-87a8-e9a1e3410410")
45
// @typescript-ignore SessionTokenSetup
46
typeSessionTokenSetupfunc(client*codersdk.Client)RefreshableSessionTokenProvider
47
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.
51
funcNew(serverURL*url.URL,setupSessionTokenSetup,opts...codersdk.ClientOption)*Client {
52
varproviderRefreshableSessionTokenProvider
53
opts=append(opts,func(c*codersdk.Client) {
codersdk/client.go
@@ -188,7 +188,7 @@ func (c *Client) SessionToken() string {
188
}
189
190
// SetSessionToken sets a fixed token for the client.
191
-// Deprecated:Build a new client using WithSessionToken instead of changing the token after creation.
+// Deprecated:Create a new client using WithSessionToken instead of changing the token after creation.
192
func (c*Client)SetSessionToken(tokenstring) {
193
c.mu.Lock()
194
deferc.mu.Unlock()