SnapshotService returns the underlying snapshotter for the provided snapshotter name
(snapshotterName string)
| 718 | |
| 719 | // SnapshotService returns the underlying snapshotter for the provided snapshotter name |
| 720 | func (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 |
| 734 | func (c *Client) DefaultNamespace() string { |
no test coverage detected