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

Method PrimaryWorkspaceProxy

coderd/workspaceproxies.go:52–69  ·  view source on GitHub ↗

PrimaryWorkspaceProxy returns the primary workspace proxy for the site.

(ctx context.Context)

Source from the content-addressed store, hash-verified

50
51// PrimaryWorkspaceProxy returns the primary workspace proxy for the site.
52func (api *API) PrimaryWorkspaceProxy(ctx context.Context) (database.WorkspaceProxy, error) {
53 region, err := api.PrimaryRegion(ctx)
54 if err != nil {
55 return database.WorkspaceProxy{}, err
56 }
57
58 // The default proxy is an edge case because these values are computed
59 // rather then being stored in the database.
60 return database.WorkspaceProxy{
61 ID: region.ID,
62 Name: region.Name,
63 DisplayName: region.DisplayName,
64 Icon: region.IconURL,
65 Url: region.PathAppURL,
66 WildcardHostname: region.WildcardHostname,
67 Deleted: false,
68 }, nil
69}
70
71// @Summary Get site-wide regions for workspace connections
72// @ID get-site-wide-regions-for-workspace-connections

Callers 2

fetchWorkspaceProxiesMethod · 0.80

Calls 1

PrimaryRegionMethod · 0.95

Tested by

no test coverage detected