MCPcopy Create free account
hub / github.com/devfile/devworkspace-operator / syncWorkspaceMainURL

Function syncWorkspaceMainURL

controllers/workspace/status.go:190–199  ·  view source on GitHub ↗
(workspace *common.DevWorkspaceWithConfig, exposedEndpoints map[string]v1alpha1.ExposedEndpointList, clusterAPI sync.ClusterAPI)

Source from the content-addressed store, hash-verified

188}
189
190func syncWorkspaceMainURL(workspace *common.DevWorkspaceWithConfig, exposedEndpoints map[string]v1alpha1.ExposedEndpointList, clusterAPI sync.ClusterAPI) (ok bool, err error) {
191 mainUrl := getMainUrl(exposedEndpoints)
192
193 if workspace.Status.MainUrl == mainUrl {
194 return true, nil
195 }
196 workspace.Status.MainUrl = mainUrl
197 err = clusterAPI.Client.Status().Update(context.TODO(), workspace.DevWorkspace)
198 return false, err
199}
200
201func checkServerStatus(workspace *common.DevWorkspaceWithConfig) (ok bool, responseCode *int, err error) {
202 mainUrl := workspace.Status.MainUrl

Callers 1

ReconcileMethod · 0.85

Calls 1

getMainUrlFunction · 0.85

Tested by

no test coverage detected