MCPcopy Create free account
hub / github.com/ByteYellow/AgentProvenance / LoadTask

Function LoadTask

internal/control/task.go:21–31  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

19}
20
21func LoadTask(path string) (Task, []byte, error) {
22 raw, err := os.ReadFile(path)
23 if err != nil {
24 return Task{}, nil, err
25 }
26 task, err := ParseTask(raw)
27 if err != nil {
28 return Task{}, nil, err
29 }
30 return task, raw, nil
31}
32
33func ParseTask(raw []byte) (Task, error) {
34 var task Task

Callers 6

BuildMethod · 0.92
InspectMethod · 0.92
CreateLeaseMethod · 0.85
CreateSessionMethod · 0.85
ResumeSnapshotMethod · 0.85

Calls 2

ParseTaskFunction · 0.85
ReadFileMethod · 0.80

Tested by

no test coverage detected