Move client snapshotter to separate package
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
parent
6eee2a0785
commit
0d1807a43d
@ -49,6 +49,7 @@ import (
|
||||
"github.com/containerd/containerd/remotes/docker"
|
||||
"github.com/containerd/containerd/remotes/docker/schema1"
|
||||
"github.com/containerd/containerd/snapshots"
|
||||
snproxy "github.com/containerd/containerd/snapshots/proxy"
|
||||
"github.com/containerd/typeurl"
|
||||
ptypes "github.com/gogo/protobuf/types"
|
||||
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
@ -467,7 +468,7 @@ func (c *Client) SnapshotService(snapshotterName string) snapshots.Snapshotter {
|
||||
if c.snapshotters != nil {
|
||||
return c.snapshotters[snapshotterName]
|
||||
}
|
||||
return NewSnapshotterFromClient(snapshotsapi.NewSnapshotsClient(c.conn), snapshotterName)
|
||||
return snproxy.NewSnapshotter(snapshotsapi.NewSnapshotsClient(c.conn), snapshotterName)
|
||||
}
|
||||
|
||||
// TaskService returns the underlying TasksClient
|
||||
|
@ -14,7 +14,7 @@
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package containerd
|
||||
package proxy
|
||||
|
||||
import (
|
||||
"context"
|
||||
@ -28,9 +28,9 @@ import (
|
||||
protobuftypes "github.com/gogo/protobuf/types"
|
||||
)
|
||||
|
||||
// NewSnapshotterFromClient returns a new Snapshotter which communicates
|
||||
// over a GRPC connection.
|
||||
func NewSnapshotterFromClient(client snapshotsapi.SnapshotsClient, snapshotterName string) snapshots.Snapshotter {
|
||||
// NewSnapshotter returns a new Snapshotter which communicates over a GRPC
|
||||
// connection using the containerd snapshot GRPC API.
|
||||
func NewSnapshotter(client snapshotsapi.SnapshotsClient, snapshotterName string) snapshots.Snapshotter {
|
||||
return &remoteSnapshotter{
|
||||
client: client,
|
||||
snapshotterName: snapshotterName,
|
Loading…
Reference in New Issue
Block a user