pub enum DataStore {
Valkey,
Memcache,
Dyniak,
}Expand description
Datastore family selected by data_store:.
§Examples
use dynomite::conf::DataStore;
assert_eq!(DataStore::from_int(0).unwrap(), DataStore::Valkey);
assert_eq!(DataStore::Valkey.as_int(), 0);
assert_eq!(DataStore::from_name("valkey").unwrap(), DataStore::Valkey);
assert_eq!(DataStore::from_name("dyniak").unwrap(), DataStore::Dyniak);Variants§
Valkey
Valkey backend, spoken over RESP (the protocol Valkey
speaks). Encoded as 0 in YAML. The historical name
redis is accepted as a back-compat alias on the YAML
side and maps to this variant.
Memcache
Memcached ASCII datastore. Encoded as 1 in YAML.
Dyniak
In-process dyniak datastore (Riak-shaped, backed by a
transactional Noxu environment). Encoded as 2 in YAML,
or as the string dyniak. Selecting this variant
requires dynomited to be built with --features riak
and a sibling noxu_path: knob. A dyniak pool serves the
Riak PBC / HTTP surface; it does not run a RESP client
proxy.
Implementations§
Source§impl DataStore
impl DataStore
Sourcepub fn from_int(v: i64) -> Result<Self, ConfError>
pub fn from_int(v: i64) -> Result<Self, ConfError>
Parse a data_store: value as it appears in YAML.
§Examples
use dynomite::conf::DataStore;
assert_eq!(DataStore::from_int(1).unwrap(), DataStore::Memcache);
assert_eq!(DataStore::from_int(2).unwrap(), DataStore::Dyniak);
assert!(DataStore::from_int(7).is_err());Sourcepub fn from_name(s: &str) -> Result<Self, ConfError>
pub fn from_name(s: &str) -> Result<Self, ConfError>
Parse the textual form of a data_store: value, as
accepted in YAML alongside the integer form.
Comparison is case-insensitive. valkey is the canonical
name for the RESP backend; redis is accepted as a
back-compat alias for the same variant so configs written
before the Valkey rename keep working. memcache and
memcached select DataStore::Memcache; dyniak
selects DataStore::Dyniak.
§Examples
use dynomite::conf::DataStore;
assert_eq!(DataStore::from_name("VALKEY").unwrap(), DataStore::Valkey);
assert_eq!(DataStore::from_name("redis").unwrap(), DataStore::Valkey);
assert!(DataStore::from_name("sql").is_err());Trait Implementations§
impl Copy for DataStore
impl Eq for DataStore
impl StructuralPartialEq for DataStore
Auto Trait Implementations§
impl Freeze for DataStore
impl RefUnwindSafe for DataStore
impl Send for DataStore
impl Sync for DataStore
impl Unpin for DataStore
impl UnsafeUnpin for DataStore
impl UnwindSafe for DataStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.