MCPcopy Index your code
hub / github.com/dagger/dagger / Extract

Method Extract

cmd/dagger/shell_state.go:131–134  ·  view source on GitHub ↗

Extract is like [Load] but also deletes the state from memory. This is expected to be used when the state is being resolved rather than just passed around.

(ctx context.Context, key string)

Source from the content-addressed store, hash-verified

129// This is expected to be used when the state is being resolved rather than
130// just passed around.
131func (s *ShellStateStore) Extract(ctx context.Context, key string) (*ShellState, error) {
132 defer s.Delete(ctx, key)
133 return s.Load(key)
134}
135
136// isUsed returns true if a state key is being used in a variable.
137func (s *ShellStateStore) isUsed(ctx context.Context, key string) bool {

Callers

nothing calls this directly

Calls 2

DeleteMethod · 0.95
LoadMethod · 0.95

Tested by

no test coverage detected