support using multiple snapshotters simultaneously
e.g. dist pull --snapshotter btrfs ...; ctr run --snapshotter btrfs ... (empty string defaults for overlayfs) Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp> Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
committed by
Michael Crosby
parent
8f1c11d862
commit
b06aab713a
@@ -35,6 +35,13 @@ import (
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
var snapshotterFlags = []cli.Flag{
|
||||
cli.StringFlag{
|
||||
Name: "snapshotter",
|
||||
Usage: "Snapshotter name. Empty value stands for the daemon default value.",
|
||||
},
|
||||
}
|
||||
|
||||
var grpcConn *grpc.ClientConn
|
||||
|
||||
// appContext returns the context for a command. Should only be called once per
|
||||
@@ -111,7 +118,7 @@ func getSnapshotter(context *cli.Context) (snapshot.Snapshotter, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return snapshotservice.NewSnapshotterFromClient(snapshotapi.NewSnapshotsClient(conn)), nil
|
||||
return snapshotservice.NewSnapshotterFromClient(snapshotapi.NewSnapshotsClient(conn), context.GlobalString("snapshotter")), nil
|
||||
}
|
||||
|
||||
func getImageStore(clicontext *cli.Context) (images.Store, error) {
|
||||
|
||||
Reference in New Issue
Block a user