Documentation
¶
Overview ¶
Package rpcdb is the transport-agnostic Layer B service spec for the remote `database.Database` service.
Layered topology:
Layer A — wire framing (github.com/luxfi/api/zap) Layer B — service spec (this package) (github.com/luxfi/protocol/rpcdb) Layer C — service impl + transport (github.com/luxfi/node/db/rpcdb)
This package contains ONLY the data carriers (HasRequest/HasResponse /…) and the wire-typed Error enum. Every transport adapter — gRPC, ZAP, future ones — depends on this package and stays orthogonal to every other transport.
The actual storage backend on the server side is the `github.com/luxfi/database`.Database interface; the canonical Service + transport adapters live in github.com/luxfi/node/db/rpcdb.
Index ¶
- type CloseRequest
- type CloseResponse
- type CompactRequest
- type CompactResponse
- type DeleteRequest
- type DeleteResponse
- type Error
- type GetRequest
- type GetResponse
- type HasRequest
- type HasResponse
- type HealthCheckResponse
- type IteratorErrorRequest
- type IteratorErrorResponse
- type IteratorNextRequest
- type IteratorNextResponse
- type IteratorReleaseRequest
- type IteratorReleaseResponse
- type NewIteratorWithStartAndPrefixRequest
- type NewIteratorWithStartAndPrefixResponse
- type PutRequest
- type PutResponse
- type WriteBatchRequest
- type WriteBatchResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloseResponse ¶
type CloseResponse struct {
Err Error
}
CloseResponse is the wire reply for Database.Close.
type CompactRequest ¶
CompactRequest is the wire payload for Database.Compact.
type CompactResponse ¶
type CompactResponse struct {
Err Error
}
CompactResponse is the wire reply for Database.Compact.
type DeleteRequest ¶
type DeleteRequest struct {
Key []byte
}
DeleteRequest is the wire payload for Database.Delete.
type DeleteResponse ¶
type DeleteResponse struct {
Err Error
}
DeleteResponse is the wire reply for Database.Delete.
type Error ¶
type Error int32
Error is the on-the-wire error code returned by every database RPC. Every transport carries it as a single byte (or proto enum, depending on transport) and maps it back to a `database` sentinel on the caller's side.
type GetRequest ¶
type GetRequest struct {
Key []byte
}
GetRequest is the wire payload for Database.Get.
type GetResponse ¶
GetResponse is the wire reply for Database.Get.
type HasRequest ¶
type HasRequest struct {
Key []byte
}
HasRequest is the wire payload for Database.Has.
type HasResponse ¶
HasResponse is the wire reply for Database.Has.
type HealthCheckResponse ¶
type HealthCheckResponse struct {
Details []byte
}
HealthCheckResponse is the wire reply for Database.HealthCheck.
type IteratorErrorRequest ¶
type IteratorErrorRequest struct {
Id uint64
}
IteratorErrorRequest is the wire payload for Database.IteratorError.
type IteratorErrorResponse ¶
type IteratorErrorResponse struct {
Err Error
}
IteratorErrorResponse is the wire reply for Database.IteratorError.
type IteratorNextRequest ¶
type IteratorNextRequest struct {
Id uint64
}
IteratorNextRequest is the wire payload for Database.IteratorNext.
type IteratorNextResponse ¶
type IteratorNextResponse struct {
Data []*PutRequest
}
IteratorNextResponse is the wire reply for Database.IteratorNext. Data is the next batch of (key, value) pairs to read; an empty batch indicates the iterator has been exhausted.
type IteratorReleaseRequest ¶
type IteratorReleaseRequest struct {
Id uint64
}
IteratorReleaseRequest is the wire payload for Database.IteratorRelease.
type IteratorReleaseResponse ¶
type IteratorReleaseResponse struct {
Err Error
}
IteratorReleaseResponse is the wire reply for Database.IteratorRelease.
type NewIteratorWithStartAndPrefixRequest ¶
NewIteratorWithStartAndPrefixRequest is the wire payload for Database.NewIteratorWithStartAndPrefix.
type NewIteratorWithStartAndPrefixResponse ¶
type NewIteratorWithStartAndPrefixResponse struct {
Id uint64
}
NewIteratorWithStartAndPrefixResponse is the wire reply for Database.NewIteratorWithStartAndPrefix.
type PutRequest ¶
PutRequest is the wire payload for Database.Put (and the PUT entries in WriteBatch / IteratorNext).
type PutResponse ¶
type PutResponse struct {
Err Error
}
PutResponse is the wire reply for Database.Put.
type WriteBatchRequest ¶
type WriteBatchRequest struct {
Puts []*PutRequest
Deletes []*DeleteRequest
}
WriteBatchRequest is the wire payload for Database.WriteBatch.
type WriteBatchResponse ¶
type WriteBatchResponse struct {
Err Error
}
WriteBatchResponse is the wire reply for Database.WriteBatch.