Function
Load
(ctx context.Context, dag *dagger.Client, id string, state []byte, worktree string)
Source from the content-addressed store, hash-verified
| 71 | } |
| 72 | |
| 73 | func Load(ctx context.Context, dag *dagger.Client, id string, state []byte, worktree string) (*Environment, error) { |
| 74 | envInfo, err := LoadInfo(ctx, id, state, worktree) |
| 75 | if err != nil { |
| 76 | return nil, err |
| 77 | } |
| 78 | env := &Environment{ |
| 79 | EnvironmentInfo: envInfo, |
| 80 | dag: dag, |
| 81 | // Services: ? |
| 82 | } |
| 83 | |
| 84 | return env, nil |
| 85 | } |
| 86 | |
| 87 | // LoadInfo loads basic environment metadata without requiring dagger operations. |
| 88 | // This is useful for operations that only need access to configuration and state |
Tested by
no test coverage detected