25 lines
815 B
Markdown
25 lines
815 B
Markdown
# KvRaw contracts (eventual consistency)
|
|
|
|
## RawPut
|
|
- **RPC**: `kvrpc.KvRaw/RawPut`
|
|
- **Request**:
|
|
- `namespace: string` (empty => `default`)
|
|
- `key: bytes`
|
|
- `value: bytes`
|
|
- **Response**:
|
|
- `success: bool`
|
|
- **Semantics**:
|
|
- Allowed only for namespaces in `eventual` mode; returns `FailedPrecondition` otherwise.
|
|
- Writes locally with LWW timestamp prefix and queues best-effort async replication via Raft when a leader is present.
|
|
|
|
## RawGet
|
|
- **RPC**: `kvrpc.KvRaw/RawGet`
|
|
- **Request**:
|
|
- `namespace: string` (empty => `default`)
|
|
- `key: bytes`
|
|
- **Response**:
|
|
- `found: bool`
|
|
- `value: bytes` (empty if not found)
|
|
- **Semantics**:
|
|
- Allowed only for `eventual` namespaces; returns `FailedPrecondition` otherwise.
|
|
- Returns value decoded from LWW-encoded payload (drops the timestamp).
|