MCPcopy
hub / github.com/containerd/containerd / SnapshotService

Method SnapshotService

client/client.go:720–731  ·  view source on GitHub ↗

SnapshotService returns the underlying snapshotter for the provided snapshotter name

(snapshotterName string)

Source from the content-addressed store, hash-verified

718
719// SnapshotService returns the underlying snapshotter for the provided snapshotter name
720func (c *Client) SnapshotService(snapshotterName string) snapshots.Snapshotter {
721 snapshotterName, err := c.resolveSnapshotterName(context.Background(), snapshotterName)
722 if err != nil {
723 snapshotterName = defaults.DefaultSnapshotter
724 }
725 if c.snapshotters != nil {
726 return c.snapshotters[snapshotterName]
727 }
728 c.connMu.Lock()
729 defer c.connMu.Unlock()
730 return snproxy.NewSnapshotter(snapshotsapi.NewSnapshotsClient(c.conn), snapshotterName)
731}
732
733// DefaultNamespace return the default namespace
734func (c *Client) DefaultNamespace() string {

Callers 2

PullMethod · 0.95
getSnapshotterMethod · 0.95

Calls 3

LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected