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