1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
//! Riak-compatible protocol layer for the Dynomite Rust port.
//!
//! `dyniak` is an optional layer that operators can put in front of
//! the Dynomite cluster substrate to expose a Riak client API. The
//! crate is intentionally narrow: it owns only the Riak-specific
//! pieces (wire codec, request dispatch, storage bridge) and reuses
//! the substrate already shipped in `crates/dynomite/` (hashing,
//! gossip, vnodes, quorum, dispatch).
//!
//! # Public surface
//!
//! * [`proto::pb`] -- the Riak Protocol Buffers wire format. Hand-rolled
//! `prost::Message` structs for the v0.0.1 operation set
//! ([`proto::pb::RpbPing`], [`proto::pb::RpbGetReq`] /
//! [`proto::pb::RpbGetResp`], [`proto::pb::RpbPutReq`] /
//! [`proto::pb::RpbPutResp`], [`proto::pb::RpbDelReq`]) plus an
//! error response. The framing layer is exposed through
//! [`proto::pb::framer`].
//! * [`server::serve_pbc`] -- TCP accept loop that reads PBC frames,
//! dispatches each request to a [`dynomite::embed::Datastore`], and
//! writes framed replies.
//! * [`server::handle_conn`] -- the per-connection driver. Generic
//! over [`tokio::io::AsyncRead`] / [`tokio::io::AsyncWrite`] so
//! tests can drive it through `tokio::io::duplex` without a real
//! socket.
//! * [`error::RiakError`] -- the crate's top-level error type.
//! * [`datastore::NoxuDatastore`] -- gated behind the `noxu` Cargo
//! feature; bridges this crate to the in-process Noxu DB storage
//! engine.
//!
//! # Architecture
//!
//! ```text
//! TCP listener (tokio::net::TcpListener)
//! |
//! v
//! serve_pbc() -- accept loop, spawns one task per conn
//! |
//! v
//! handle_conn(stream, datastore)
//! - decode 4-byte BE length
//! - decode 1-byte msg code
//! - decode protobuf body via prost
//! - dispatch through dynomite::embed::Datastore
//! - encode response via prost
//! - write framed response
//! ```
//!
//! # Encoding
//!
//! The PBC path is hard-coded to `application/x-protobuf`; the bytes
//! travel through a [`dyn_encoding::ProtobufCodec`] wired up in
//! [`proto::pb::codec_registry`]. The `dyn-encoding` machinery is in
//! place so the upcoming HTTP gateway can negotiate JSON / CBOR /
//! protobuf per-request through the same registry.
pub use crateRiakError;
pub use crate;
pub use crate;
// Cluster admin RPC entry points -- v0.0.4 admin slice. Wired
// to the `dyn-admin` cluster-* subcommands. Re-exported below
// the existing block so parallel branches do not conflict.
pub use crate;
// Routing-hooks entry point -- bucket-property knobs slice.
// Re-exported below the prior block so parallel branches do
// not conflict.
pub use crate;
// AAE-status entry points -- AAE R5 slice. Re-exported below
// the prior block so parallel branches do not conflict.
pub use crate;
// TTL-driven sibling and tombstone garbage-collection FSM.
// Re-exported below the prior block so parallel branches do
// not conflict.
// MapReduce framework added by the v0.0.3 slice. The module owns
// its own public surface; see `crate::mapreduce` for entry points.
// Walk-N-successors replication and bucket-routing helpers.
// Re-exported below the prior block so parallel branches do
// not conflict.
pub use crate;
pub use crate;
pub use crate;