etcd 3.0.xでは、新しいAPIが導入されました。一つのことは、RangeRequest
オブジェクトで私には不明です。 description of the property range_end
では、それは言う:etcd v3.0.xでは、どのプレフィックスを持つすべてのキーを要求するのですか?
RANGE_ENDが指定されたキーより1ビット大きい場合、 その後、範囲要求は、プレフィックス(指定したキー)を持つすべてのキーを取得します。ここで
いくつかのコンテキストを提供するための完全なテキストです:
// key is the first key for the range. If range_end is not given, the request only looks up key.
bytes key = 1;
// range_end is the upper bound on the requested range [key, range_end).
// If range_end is '\0', the range is all keys >= key.
// If the range_end is one bit larger than the given key,
// then the range requests get the all keys with the prefix (the given key).
// If both key and range_end are '\0', then range requests returns all keys.
bytes range_end = 2;
私の質問は:RANGE_ENDが指定されたキーより1ビット大きい場合
とはどういう意味ですか
? range_end
はkey
よりも1ビット長くなっていますか?整数として解釈されるとき、それはkey+1
でなければならないのでしょうか?後者の場合は、どのエンコーディングですか?