MCPcopy
hub / github.com/kopia/kopia / runServerStatus

Method runServerStatus

cli/command_server_status.go:31–46  ·  view source on GitHub ↗
(ctx context.Context, cli *apiclient.KopiaAPIClient)

Source from the content-addressed store, hash-verified

29}
30
31func (c *commandServerStatus) runServerStatus(ctx context.Context, cli *apiclient.KopiaAPIClient) error {
32 var status serverapi.SourcesResponse
33 if err := cli.Get(ctx, "control/sources", nil, &status); err != nil {
34 return errors.Wrap(err, "unable to list sources")
35 }
36
37 for _, src := range status.Sources {
38 if src.Status == "REMOTE" && !c.remote {
39 continue
40 }
41
42 c.out.printStdout("%v: %v\n", src.Status, src.Source)
43 }
44
45 return nil
46}

Callers

nothing calls this directly

Calls 2

printStdoutMethod · 0.80
GetMethod · 0.65

Tested by

no test coverage detected