MCPcopy
hub / github.com/dagger/container-use / Info

Method Info

repository/repository.go:270–291  ·  view source on GitHub ↗

Info retrieves environment metadata without requiring dagger operations. This is more efficient than Get() when you only need access to configuration, state, and other metadata without performing container operations.

(ctx context.Context, id string)

Source from the content-addressed store, hash-verified

268// This is more efficient than Get() when you only need access to configuration,
269// state, and other metadata without performing container operations.
270func (r *Repository) Info(ctx context.Context, id string) (*environment.EnvironmentInfo, error) {
271 if err := r.exists(ctx, id); err != nil {
272 return nil, err
273 }
274
275 worktree, err := r.getWorktree(ctx, id)
276 if err != nil {
277 return nil, err
278 }
279
280 state, err := r.loadState(ctx, worktree)
281 if err != nil {
282 return nil, err
283 }
284
285 envInfo, err := environment.LoadInfo(ctx, id, state, worktree)
286 if err != nil {
287 return nil, err
288 }
289
290 return envInfo, nil
291}
292
293// List returns information about all environments in the repository.
294// Returns EnvironmentInfo slice avoiding dagger client initialization.

Callers 15

ListMethod · 0.95
LogMethod · 0.95
DiffMethod · 0.95
MergeMethod · 0.95
ApplyMethod · 0.95
RunStdioServerFunction · 0.80
wrapToolFunction · 0.80
ensureForkMethod · 0.80
RunGitCommandFunction · 0.80
RunInteractiveGitCommandFunction · 0.80
initializeWorktreeMethod · 0.80

Calls 4

existsMethod · 0.95
getWorktreeMethod · 0.95
loadStateMethod · 0.95
LoadInfoFunction · 0.92

Tested by

no test coverage detected