MCPcopy Index your code
hub / github.com/coder/coder / New

Function New

codersdk/client.go:118–128  ·  view source on GitHub ↗

New creates a Coder client for the provided URL.

(serverURL *url.URL, opts ...ClientOption)

Source from the content-addressed store, hash-verified

116
117// New creates a Coder client for the provided URL.
118func New(serverURL *url.URL, opts ...ClientOption) *Client {
119 client := &Client{
120 URL: serverURL,
121 HTTPClient: &http.Client{},
122 SessionTokenProvider: FixedSessionTokenProvider{},
123 }
124 for _, opt := range opts {
125 opt(client)
126 }
127 return client
128}
129
130// Client is an HTTP caller for methods to the Coder API.
131// @typescript-ignore Client

Callers 15

TestUserOAuth2GithubFunction · 0.92
TestUserLogoutFunction · 0.92
TestListChatsFunction · 0.92
TestListChatModelsFunction · 0.92
TestWatchChatsFunction · 0.92
TestStreamChatFunction · 0.92
TestRegenerateChatTitleFunction · 0.92
TestPostChatFileFunction · 0.92
TestChatSystemPromptFunction · 0.92
TestChatDesktopEnabledFunction · 0.92

Calls

no outgoing calls

Tested by 15

TestUserOAuth2GithubFunction · 0.74
TestUserLogoutFunction · 0.74
TestListChatsFunction · 0.74
TestListChatModelsFunction · 0.74
TestWatchChatsFunction · 0.74
TestStreamChatFunction · 0.74
TestRegenerateChatTitleFunction · 0.74
TestPostChatFileFunction · 0.74
TestChatSystemPromptFunction · 0.74
TestChatDesktopEnabledFunction · 0.74