pub enum Target {
Memory,
File {
path: PathBuf,
},
Grpc {
endpoint: String,
},
GrpcCluster {
primary: String,
replicas: Vec<String>,
force_primary: bool,
},
Http {
base_url: String,
},
}Expand description
What kind of backend the user asked for.
Note: red:// and reds:// URIs are folded onto
Target::Grpc / Target::GrpcCluster for backwards
compatibility with the previous driver release. New code that
wants the RedWire variant explicitly should depend on
reddb-wire directly.
Variants§
Memory
memory:// — ephemeral, in-memory backend.
File
file:///abs/path — embedded engine on disk.
Grpc
grpc://host:port — single-host remote tonic client.
Also produced by red://host:port and reds://host:port
for back-compat with the previous driver behaviour.
GrpcCluster
grpc://primary:port,replica1:port,replica2:port — primary +
read-replica fleet. Writes always go to primary; reads
round-robin across replicas (or to primary when the
replica set is empty / a ?route=primary query param is set).
Http
http://host:port / https://host:port — REST client.
Trait Implementations§
impl Eq for Target
impl StructuralPartialEq for Target
Auto Trait Implementations§
impl Freeze for Target
impl RefUnwindSafe for Target
impl Send for Target
impl Sync for Target
impl Unpin for Target
impl UnsafeUnpin for Target
impl UnwindSafe for Target
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request