snapshot.proto 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. syntax = "proto3";
  2. package docker.swarmkit.v1;
  3. import "objects.proto";
  4. import "raft.proto";
  5. import weak "gogoproto/gogo.proto";
  6. // StoreSnapshot is used to store snapshots of the store.
  7. message StoreSnapshot {
  8. // TODO(aaronl): The current method of assembling a StoreSnapshot
  9. // structure and marshalling it is not optimal. It may be better to
  10. // write out nodes, networks, tasks, etc. one at a time to an io.Writer
  11. // using gogo-protobuf's io.DelimitedWriter. A new value of the version
  12. // field could support this approach.
  13. repeated Node nodes = 1;
  14. repeated Service services = 2;
  15. repeated Network networks = 3;
  16. repeated Task tasks = 4;
  17. repeated Cluster clusters = 5;
  18. repeated Secret secrets = 6;
  19. repeated Resource resources = 7;
  20. repeated Extension extensions = 8;
  21. repeated Config configs = 9;
  22. }
  23. // ClusterSnapshot stores cluster membership information in snapshots.
  24. message ClusterSnapshot {
  25. repeated RaftMember members = 1;
  26. repeated uint64 removed = 2 [packed=false];
  27. }
  28. message Snapshot {
  29. enum Version {
  30. // V0 is the initial version of the StoreSnapshot message.
  31. V0 = 0;
  32. }
  33. Version version = 1;
  34. ClusterSnapshot membership = 2 [(gogoproto.nullable) = false];
  35. StoreSnapshot store = 3 [(gogoproto.nullable) = false];
  36. }