File: snapshot.proto

package info (click to toggle)
docker.io 26.1.5%2Bdfsg1-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 68,576 kB
  • sloc: sh: 5,748; makefile: 912; ansic: 664; asm: 228; python: 162
file content (45 lines) | stat: -rw-r--r-- 1,344 bytes parent folder | download | duplicates (2)
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
syntax = "proto3";

package docker.swarmkit.v1;

import "github.com/docker/swarmkit/api/objects.proto";
import "github.com/docker/swarmkit/api/raft.proto";
import weak "gogoproto/gogo.proto";

// StoreSnapshot is used to store snapshots of the store.
message StoreSnapshot {
	// TODO(aaronl): The current method of assembling a StoreSnapshot
	// structure and marshalling it is not optimal. It may be better to
	// write out nodes, networks, tasks, etc. one at a time to an io.Writer
	// using gogo-protobuf's io.DelimitedWriter. A new value of the version
	// field could support this approach.

	repeated Node nodes = 1;
	repeated Service services = 2;
	repeated Network networks = 3;
	repeated Task tasks = 4;
	repeated Cluster clusters = 5;
	repeated Secret secrets = 6;
	repeated Resource resources = 7;
	repeated Extension extensions = 8;
	repeated Config configs = 9;
	repeated Volume volumes = 10;
}

// ClusterSnapshot stores cluster membership information in snapshots.
message ClusterSnapshot {
	repeated RaftMember members = 1;
	repeated uint64 removed = 2 [packed=false];
}

message Snapshot {
	enum Version {
		// V0 is the initial version of the StoreSnapshot message.
		V0 = 0;
	}

	Version version = 1;

	ClusterSnapshot membership = 2 [(gogoproto.nullable) = false];
	StoreSnapshot store = 3 [(gogoproto.nullable) = false];
}