File: diff.proto

package info (click to toggle)
containerd 1.4.5~ds1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 14,640 kB
  • sloc: sh: 463; makefile: 264; ansic: 179; asm: 7
file content (65 lines) | stat: -rw-r--r-- 2,048 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
syntax = "proto3";

package containerd.services.diff.v1;

import weak "gogoproto/gogo.proto";
import "google/protobuf/any.proto";
import "github.com/containerd/containerd/api/types/mount.proto";
import "github.com/containerd/containerd/api/types/descriptor.proto";

option go_package = "github.com/containerd/containerd/api/services/diff/v1;diff";

// Diff service creates and applies diffs
service Diff {
	// Apply applies the content associated with the provided digests onto
	// the provided mounts. Archive content will be extracted and
	// decompressed if necessary.
	rpc Apply(ApplyRequest) returns (ApplyResponse);

	// Diff creates a diff between the given mounts and uploads the result
	// to the content store.
	rpc Diff(DiffRequest) returns (DiffResponse);
}

message ApplyRequest {
	// Diff is the descriptor of the diff to be extracted
	containerd.types.Descriptor diff = 1;

	repeated containerd.types.Mount mounts = 2;

	map<string, google.protobuf.Any> payloads = 3;
}

message ApplyResponse {
	// Applied is the descriptor for the object which was applied.
	// If the input was a compressed blob then the result will be
	// the descriptor for the uncompressed blob.
	containerd.types.Descriptor applied = 1;
}

message DiffRequest {
	// Left are the mounts which represent the older copy
	// in which is the base of the computed changes.
	repeated containerd.types.Mount left = 1;

	// Right are the mounts which represents the newer copy
	// in which changes from the left were made into.
	repeated containerd.types.Mount right = 2;

	// MediaType is the media type descriptor for the created diff
	// object
	string media_type = 3;

	// Ref identifies the pre-commit content store object. This
	// reference can be used to get the status from the content store.
	string ref = 4;

	// Labels are the labels to apply to the generated content
	// on content store commit.
	map<string, string> labels = 5;
}

message DiffResponse {
	// Diff is the descriptor of the diff which can be applied
	containerd.types.Descriptor diff = 3;
}