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

Method BuildInfo

codersdk/deployment.go:5110–5123  ·  view source on GitHub ↗

BuildInfo returns build information for this instance of Coder.

(ctx context.Context)

Source from the content-addressed store, hash-verified

5108
5109// BuildInfo returns build information for this instance of Coder.
5110func (c *Client) BuildInfo(ctx context.Context) (BuildInfoResponse, error) {
5111 res, err := c.Request(ctx, http.MethodGet, "/api/v2/buildinfo", nil)
5112 if err != nil {
5113 return BuildInfoResponse{}, err
5114 }
5115 defer res.Body.Close()
5116
5117 if res.StatusCode != http.StatusOK || ExpectJSONMime(res) != nil {
5118 return BuildInfoResponse{}, ReadBodyAsError(res)
5119 }
5120
5121 var buildInfo BuildInfoResponse
5122 return buildInfo, json.NewDecoder(res.Body).Decode(&buildInfo)
5123}
5124
5125type Experiment string
5126

Callers 7

TestBuildInfoFunction · 0.80
createHTTPClientMethod · 0.80
showMethod · 0.80
configSSHMethod · 0.80
NewFunction · 0.80
healthReportMethod · 0.80
DeploymentInfoFunction · 0.80

Calls 4

RequestMethod · 0.95
ExpectJSONMimeFunction · 0.85
ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65

Tested by 1

TestBuildInfoFunction · 0.64