Struct fluvio::config::FluvioConfig
source · #[non_exhaustive]pub struct FluvioConfig {
pub endpoint: String,
pub use_spu_local_address: bool,
pub tls: TlsPolicy,
pub client_id: Option<String>,
/* private fields */
}
Expand description
Fluvio Cluster Target Configuration This is part of profile
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.endpoint: String
The address to connect to the Fluvio cluster
use_spu_local_address: bool
§tls: TlsPolicy
The TLS policy to use when connecting to the cluster
client_id: Option<String>
This is not part of profile and doesn’t persist. It is purely to override client id when creating ClientConfig
Implementations§
source§impl FluvioConfig
impl FluvioConfig
sourcepub fn load() -> Result<Self, FluvioError>
pub fn load() -> Result<Self, FluvioError>
get current cluster config from default profile
sourcepub fn with_tls(self, tls: impl Into<TlsPolicy>) -> Self
pub fn with_tls(self, tls: impl Into<TlsPolicy>) -> Self
Add TLS configuration for this cluster.
pub fn query_metadata_by_name<'de, T>(&self, name: &str) -> Option<T>where
T: Deserialize<'de>,
pub fn update_metadata_by_name<S>(&mut self, name: &str, data: S) -> Result<()>where
S: Serialize,
pub fn has_metadata(&self, name: &str) -> bool
Trait Implementations§
source§impl Clone for FluvioConfig
impl Clone for FluvioConfig
source§fn clone(&self) -> FluvioConfig
fn clone(&self) -> FluvioConfig
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 FluvioConfig
impl Debug for FluvioConfig
source§impl<'de> Deserialize<'de> for FluvioConfig
impl<'de> Deserialize<'de> for FluvioConfig
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 FluvioConfig
impl PartialEq for FluvioConfig
source§fn eq(&self, other: &FluvioConfig) -> bool
fn eq(&self, other: &FluvioConfig) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for FluvioConfig
impl Serialize for FluvioConfig
source§impl TryFrom<FluvioConfig> for ClientConfig
impl TryFrom<FluvioConfig> for ClientConfig
impl StructuralPartialEq for FluvioConfig
Auto Trait Implementations§
impl Freeze for FluvioConfig
impl RefUnwindSafe for FluvioConfig
impl Send for FluvioConfig
impl Sync for FluvioConfig
impl Unpin for FluvioConfig
impl UnwindSafe for FluvioConfig
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