Add init and get mounts to rootfs service

Update rootfs package to add mount initializer function.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
Derek McGowan
2017-03-09 18:11:26 -08:00
parent 38a6f90f2b
commit 5d4577534a
6 changed files with 847 additions and 46 deletions

View File

@@ -3,16 +3,13 @@ syntax = "proto3";
package containerd.v1;
import "gogoproto/gogo.proto";
import "google/protobuf/empty.proto";
import "github.com/docker/containerd/api/types/mount/mount.proto";
import "github.com/docker/containerd/api/types/descriptor/descriptor.proto";
service RootFS {
rpc Prepare(PrepareRequest) returns (PrepareResponse);
// TODO: Add method for initializing and retrieving mounts
//rpc InitMounts(InitRequest) returns (MountResponse);
//rpc Mounts(MountRequest) returns (MountResponse);
rpc InitMounts(InitMountsRequest) returns (MountResponse);
rpc Mounts(MountsRequest) returns (MountResponse);
}
message PrepareRequest {
@@ -23,16 +20,16 @@ message PrepareResponse {
string chainid = 1 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false, (gogoproto.customname) = "ChainID"];
}
//message InitRequest {
// string name = 1;
// string chainID = 2;
// bool Readonly = 3;
//}
//
//message MountRequest {
// string name = 1;
//}
//
//message MountResponse {
// repeated containerd.v1.types.Mount mounts = 1;
//}
message InitMountsRequest {
string name = 1;
string chainID = 2 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false, (gogoproto.customname) = "ChainID"];
bool Readonly = 3;
}
message MountsRequest {
string name = 1;
}
message MountResponse {
repeated containerd.v1.types.Mount mounts = 1;
}