MCPcopy
hub / github.com/kopia/kopia / CreateSnapshotSource

Function CreateSnapshotSource

internal/serverapi/client_wrappers.go:19–26  ·  view source on GitHub ↗

CreateSnapshotSource creates snapshot source with a given path.

(ctx context.Context, c *apiclient.KopiaAPIClient, req *CreateSnapshotSourceRequest)

Source from the content-addressed store, hash-verified

17
18// CreateSnapshotSource creates snapshot source with a given path.
19func CreateSnapshotSource(ctx context.Context, c *apiclient.KopiaAPIClient, req *CreateSnapshotSourceRequest) (*CreateSnapshotSourceResponse, error) {
20 resp := &CreateSnapshotSourceResponse{}
21 if err := c.Post(ctx, "sources", req, resp); err != nil {
22 return nil, errors.Wrap(err, "CreateSnapshotSource")
23 }
24
25 return resp, nil
26}
27
28// Estimate starts snapshot estimation task for a given directory.
29func Estimate(ctx context.Context, c *apiclient.KopiaAPIClient, req *EstimateRequest) (*uitask.Info, error) {

Callers 3

mustCreateSourceFunction · 0.92
TestServerStartFunction · 0.92

Calls 1

PostMethod · 0.80

Tested by 3

mustCreateSourceFunction · 0.74
TestServerStartFunction · 0.74