MCPcopy
hub / github.com/kopia/kopia / handleTaskInfo

Function handleTaskInfo

internal/server/api_tasks.go:21–30  ·  view source on GitHub ↗
(_ context.Context, rc requestContext)

Source from the content-addressed store, hash-verified

19}
20
21func handleTaskInfo(_ context.Context, rc requestContext) (any, *apiError) {
22 taskID := rc.muxVar("taskID")
23
24 t, ok := rc.srv.taskManager().GetTask(taskID)
25 if !ok {
26 return nil, notFoundError("task not found")
27 }
28
29 return t, nil
30}
31
32func handleTaskSummary(_ context.Context, rc requestContext) (any, *apiError) {
33 return rc.srv.taskManager().TaskSummary(), nil

Callers

nothing calls this directly

Calls 4

notFoundErrorFunction · 0.85
muxVarMethod · 0.80
GetTaskMethod · 0.80
taskManagerMethod · 0.65

Tested by

no test coverage detected