NOTE: this doc is not finished!
All Responses from etcd API have a response header attached. The response header includes the metadata of the response.
message ResponseHeader { uint64 cluster_id = 1; uint64 member_id = 2; int64 revision = 3; uint64 raft_term = 4; }
An application may read the Cluster_ID (Member_ID) field to ensure it is communicating with the intended cluster (member).
Applications can use the Revision to know the latest revision of the key-value store. This is especially useful when applications specify a historical revision to make time travel query and wishes to know the latest revision at the time of the request.
Applications can use Raft_Term to detect when the cluster completes a new leader election.
Key-Value API is used to manipulate key-value pairs stored inside etcd. The key-value API is defined as a gRPC service. The Key-Value pair is defined as structured data in protobuf format.
A key-value pair is the smallest unit that the key-value API can manipulate. Each key-value pair has a number of fields:
message KeyValue { bytes key = 1; int64 create_revision = 2; int64 mod_revision = 3; int64 version = 4; bytes value = 5; int64 lease = 6; }