MCPcopy Create free account
hub / github.com/dagger/dagger / workspaceRefFromClientMetadata

Function workspaceRefFromClientMetadata

engine/server/session_workspaces.go:118–126  ·  view source on GitHub ↗

workspaceRefFromClientMetadata returns the explicitly declared workspace binding, if present.

(clientMD *engine.ClientMetadata)

Source from the content-addressed store, hash-verified

116// workspaceRefFromClientMetadata returns the explicitly declared workspace
117// binding, if present.
118func workspaceRefFromClientMetadata(clientMD *engine.ClientMetadata) (string, bool) {
119 if clientMD == nil {
120 return "", false
121 }
122 if clientMD.Workspace != nil {
123 return *clientMD.Workspace, true
124 }
125 return "", false
126}
127
128// inheritWorkspaceBinding copies the nearest available parent workspace binding
129// onto the current client. This keeps nested clients aligned with their parent

Callers 3

getOrInitClientMethod · 0.85
workspaceBindingModeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected