pub struct ConnectionConfig {
pub subscriptions: Box<[Subject]>,
pub consumers: Box<[ConsumerConfig]>,
pub cluster_uris: Box<[Box<str>]>,
pub auth_jwt: Option<Box<str>>,
pub auth_seed: Option<Box<str>>,
pub tls_ca: Option<Box<str>>,
pub tls_ca_file: Option<Box<str>>,
pub ping_interval_sec: Option<u16>,
pub custom_inbox_prefix: Option<Box<str>>,
}
Expand description
Configuration for connecting a nats client. More options are available if you use the json than variables in the values string map.
Fields§
§subscriptions: Box<[Subject]>
List of topics to subscribe to
consumers: Box<[ConsumerConfig]>
List of JetStream consumers
cluster_uris: Box<[Box<str>]>
Cluster(s) to make a subscription on and connect to
auth_jwt: Option<Box<str>>
Auth JWT to use (if necessary)
auth_seed: Option<Box<str>>
Auth seed to use (if necessary)
tls_ca: Option<Box<str>>
TLS Certificate Authority, encoded as a string
tls_ca_file: Option<Box<str>>
TLS Certifiate Authority, as a path on disk
ping_interval_sec: Option<u16>
Ping interval in seconds
custom_inbox_prefix: Option<Box<str>>
Inbox prefix to use (by default
Implementations§
source§impl ConnectionConfig
impl ConnectionConfig
sourcepub fn merge(&self, extra: &ConnectionConfig) -> ConnectionConfig
pub fn merge(&self, extra: &ConnectionConfig) -> ConnectionConfig
Merge a given ConnectionConfig
with another, coalescing fields and overriding
where necessary
source§impl ConnectionConfig
impl ConnectionConfig
sourcepub fn from_link_config(_: &LinkConfig<'_>) -> Result<ConnectionConfig>
pub fn from_link_config(_: &LinkConfig<'_>) -> Result<ConnectionConfig>
Create a ConnectionConfig
from a given LinkConfig
sourcepub fn from_map(values: &HashMap<String, String>) -> Result<ConnectionConfig>
pub fn from_map(values: &HashMap<String, String>) -> Result<ConnectionConfig>
Construct configuration Struct from the passed hostdata config
NOTE: Prefer Self::from_link_config
rather than this method directly
Trait Implementations§
source§impl Clone for ConnectionConfig
impl Clone for ConnectionConfig
source§fn clone(&self) -> ConnectionConfig
fn clone(&self) -> ConnectionConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ConnectionConfig
impl Debug for ConnectionConfig
source§impl Default for ConnectionConfig
impl Default for ConnectionConfig
source§fn default() -> ConnectionConfig
fn default() -> ConnectionConfig
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for ConnectionConfig
impl<'de> Deserialize<'de> for ConnectionConfig
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for ConnectionConfig
impl PartialEq for ConnectionConfig
source§impl Serialize for ConnectionConfig
impl Serialize for ConnectionConfig
impl StructuralPartialEq for ConnectionConfig
Auto Trait Implementations§
impl Freeze for ConnectionConfig
impl RefUnwindSafe for ConnectionConfig
impl Send for ConnectionConfig
impl Sync for ConnectionConfig
impl Unpin for ConnectionConfig
impl UnwindSafe for ConnectionConfig
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> FromBase64 for Twhere
T: for<'de> Deserialize<'de>,
impl<T> FromBase64 for Twhere
T: for<'de> Deserialize<'de>,
source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> 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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request