github.com/containerd/Containerd@v1.4.13/api/services/snapshots/v1/snapshots.proto (about) 1 syntax = "proto3"; 2 3 package containerd.services.snapshots.v1; 4 5 import weak "gogoproto/gogo.proto"; 6 import "google/protobuf/empty.proto"; 7 import "google/protobuf/field_mask.proto"; 8 import "google/protobuf/timestamp.proto"; 9 import "github.com/containerd/containerd/api/types/mount.proto"; 10 11 option go_package = "github.com/containerd/containerd/api/services/snapshots/v1;snapshots"; 12 13 // Snapshot service manages snapshots 14 service Snapshots { 15 rpc Prepare(PrepareSnapshotRequest) returns (PrepareSnapshotResponse); 16 rpc View(ViewSnapshotRequest) returns (ViewSnapshotResponse); 17 rpc Mounts(MountsRequest) returns (MountsResponse); 18 rpc Commit(CommitSnapshotRequest) returns (google.protobuf.Empty); 19 rpc Remove(RemoveSnapshotRequest) returns (google.protobuf.Empty); 20 rpc Stat(StatSnapshotRequest) returns (StatSnapshotResponse); 21 rpc Update(UpdateSnapshotRequest) returns (UpdateSnapshotResponse); 22 rpc List(ListSnapshotsRequest) returns (stream ListSnapshotsResponse); 23 rpc Usage(UsageRequest) returns (UsageResponse); 24 rpc Cleanup(CleanupRequest) returns (google.protobuf.Empty); 25 } 26 27 message PrepareSnapshotRequest { 28 string snapshotter = 1; 29 string key = 2; 30 string parent = 3; 31 32 // Labels are arbitrary data on snapshots. 33 // 34 // The combined size of a key/value pair cannot exceed 4096 bytes. 35 map<string, string> labels = 4; 36 } 37 38 message PrepareSnapshotResponse { 39 repeated containerd.types.Mount mounts = 1; 40 } 41 42 message ViewSnapshotRequest { 43 string snapshotter = 1; 44 string key = 2; 45 string parent = 3; 46 47 // Labels are arbitrary data on snapshots. 48 // 49 // The combined size of a key/value pair cannot exceed 4096 bytes. 50 map<string, string> labels = 4; 51 } 52 53 message ViewSnapshotResponse { 54 repeated containerd.types.Mount mounts = 1; 55 } 56 57 message MountsRequest { 58 string snapshotter = 1; 59 string key = 2; 60 } 61 62 message MountsResponse { 63 repeated containerd.types.Mount mounts = 1; 64 } 65 66 message RemoveSnapshotRequest { 67 string snapshotter = 1; 68 string key = 2; 69 } 70 71 message CommitSnapshotRequest { 72 string snapshotter = 1; 73 string name = 2; 74 string key = 3; 75 76 // Labels are arbitrary data on snapshots. 77 // 78 // The combined size of a key/value pair cannot exceed 4096 bytes. 79 map<string, string> labels = 4; 80 } 81 82 message StatSnapshotRequest { 83 string snapshotter = 1; 84 string key = 2; 85 } 86 87 enum Kind { 88 option (gogoproto.goproto_enum_prefix) = false; 89 option (gogoproto.enum_customname) = "Kind"; 90 91 UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "KindUnknown"]; 92 VIEW = 1 [(gogoproto.enumvalue_customname) = "KindView"]; 93 ACTIVE = 2 [(gogoproto.enumvalue_customname) = "KindActive"]; 94 COMMITTED = 3 [(gogoproto.enumvalue_customname) = "KindCommitted"]; 95 } 96 97 message Info { 98 string name = 1; 99 string parent = 2; 100 Kind kind = 3; 101 102 // CreatedAt provides the time at which the snapshot was created. 103 google.protobuf.Timestamp created_at = 4 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; 104 105 // UpdatedAt provides the time the info was last updated. 106 google.protobuf.Timestamp updated_at = 5 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; 107 108 // Labels are arbitrary data on snapshots. 109 // 110 // The combined size of a key/value pair cannot exceed 4096 bytes. 111 map<string, string> labels = 6; 112 } 113 114 message StatSnapshotResponse { 115 Info info = 1 [(gogoproto.nullable) = false]; 116 } 117 118 message UpdateSnapshotRequest { 119 string snapshotter = 1; 120 Info info = 2 [(gogoproto.nullable) = false]; 121 122 // UpdateMask specifies which fields to perform the update on. If empty, 123 // the operation applies to all fields. 124 // 125 // In info, Name, Parent, Kind, Created are immutable, 126 // other field may be updated using this mask. 127 // If no mask is provided, all mutable field are updated. 128 google.protobuf.FieldMask update_mask = 3; 129 } 130 131 message UpdateSnapshotResponse { 132 Info info = 1 [(gogoproto.nullable) = false]; 133 } 134 135 message ListSnapshotsRequest{ 136 string snapshotter = 1; 137 138 // Filters contains one or more filters using the syntax defined in the 139 // containerd filter package. 140 // 141 // The returned result will be those that match any of the provided 142 // filters. Expanded, images that match the following will be 143 // returned: 144 // 145 // filters[0] or filters[1] or ... or filters[n-1] or filters[n] 146 // 147 // If filters is zero-length or nil, all items will be returned. 148 repeated string filters = 2; 149 } 150 151 message ListSnapshotsResponse { 152 repeated Info info = 1 [(gogoproto.nullable) = false]; 153 } 154 155 message UsageRequest { 156 string snapshotter = 1; 157 string key = 2; 158 } 159 160 message UsageResponse { 161 int64 size = 1; 162 int64 inodes = 2; 163 } 164 165 message CleanupRequest { 166 string snapshotter = 1; 167 }