api/services/content: define delete method

Allow deletion of content over the GRPC interface. For now, we are going
with a model that conducts reference management outside of the content
store, in the metadata store but this design is valid either way.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
Stephen J Day 2017-02-27 20:06:29 -08:00
parent be20bb1eb8
commit 706c629354
No known key found for this signature in database
GPG key ID: 67B3DED84EDC823F
5 changed files with 269 additions and 62 deletions

View file

@ -4,6 +4,7 @@ package containerd.v1;
import "gogoproto/gogo.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/empty.proto";
// Content provides access to a content addressable storage system.
service Content {
@ -13,6 +14,9 @@ service Content {
// existence.
rpc Info(InfoRequest) returns (InfoResponse);
// Delete will delete the referenced object.
rpc Delete(DeleteContentRequest) returns (google.protobuf.Empty);
// Read allows one to read an object based on the offset into the content.
//
// The requested data may be returned in one or more messages.
@ -59,6 +63,11 @@ message InfoResponse {
google.protobuf.Timestamp committed_at = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
}
message DeleteContentRequest {
// Digest specifies which content to delete.
string digest = 1 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false];
}
// ReadRequest defines the fields that make up a request to read a portion of
// data from a stored object.
message ReadRequest {