43 lines
1.2 KiB
Protocol Buffer
43 lines
1.2 KiB
Protocol Buffer
syntax = "proto3";
|
|
package etcdserverpb;
|
|
|
|
message Compare {
|
|
enum CompareResult {
|
|
EQUAL = 0;
|
|
GREATER = 1;
|
|
LESS = 2;
|
|
NOT_EQUAL = 3;
|
|
}
|
|
enum CompareTarget {
|
|
VERSION = 0;
|
|
CREATE = 1;
|
|
MOD = 2;
|
|
VALUE = 3;
|
|
LEASE = 4;
|
|
}
|
|
// result is logical comparison operation for this comparison.
|
|
CompareResult result = 1;
|
|
// target is the key-value field to inspect for the comparison.
|
|
CompareTarget target = 2;
|
|
// key is the subject key for the comparison operation.
|
|
bytes key = 3;
|
|
oneof target_union {
|
|
// version is the version of the given key
|
|
int64 version = 4;
|
|
// create_revision is the creation revision of the given key
|
|
int64 create_revision = 5;
|
|
// mod_revision is the last modified revision of the given key.
|
|
int64 mod_revision = 6;
|
|
// value is the value of the given key, in bytes.
|
|
bytes value = 7;
|
|
// lease is the lease id of the given key.
|
|
int64 lease = 8;
|
|
// leave room for more target_union field tags, jump to 64
|
|
}
|
|
|
|
// range_end compares the given target to all keys in the range [key, range_end).
|
|
// See RangeRequest for more details on key ranges.
|
|
bytes range_end = 64;
|
|
// TODO: fill out with most of the rest of RangeRequest fields when needed.
|
|
}
|