pub struct GlobalConfig {Show 13 fields
pub path: PathBuf,
pub default_url_template: String,
pub initial_query: String,
pub theme: String,
pub highlighter_theme: Option<String>,
pub clusters: IndexMap<String, ClusterConfig>,
pub consumer: ConsumerConfig,
pub default_kafka_config: IndexMap<String, String>,
pub history: Vec<String>,
pub show_shortcuts: bool,
pub export_directory: PathBuf,
pub log_file: Option<PathBuf>,
pub timestamp_format: TimestampFormat,
}Expand description
Configuration of the application
Fields§
§path: PathBufPath of this config
default_url_template: StringA placeholder url that will be used when you want to open a kafka record in the browser
initial_query: StringThe initial search query when you start the UI
theme: StringThe theme to use in the TUI
highlighter_theme: Option<String>The theme to use for syntax highlighting
clusters: IndexMap<String, ClusterConfig>The kafka properties for each cluster
consumer: ConsumerConfigThe default configuration for the yozefu kafka consumer
default_kafka_config: IndexMap<String, String>The default kafka properties inherited for every cluster
history: Vec<String>History of past search queries
show_shortcuts: boolShow shortcuts
export_directory: PathBuf§log_file: Option<PathBuf>The file to write logs to
timestamp_format: TimestampFormatShow the timestamp as a date time or as “X minutes ago”
Implementations§
Source§impl GlobalConfig
impl GlobalConfig
pub fn new(path: &Path) -> Self
Sourcepub fn url_template_of(&self, cluster: &str) -> String
pub fn url_template_of(&self, cluster: &str) -> String
web URL template for a given cluster
Sourcepub fn schema_registry_config_of(
&self,
cluster: &str,
) -> Option<SchemaRegistryConfig>
pub fn schema_registry_config_of( &self, cluster: &str, ) -> Option<SchemaRegistryConfig>
Returns the schema registry configuration for the given cluster.
Trait Implementations§
Source§impl Clone for GlobalConfig
impl Clone for GlobalConfig
Source§fn clone(&self) -> GlobalConfig
fn clone(&self) -> GlobalConfig
Returns a duplicate 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 GlobalConfig
impl Debug for GlobalConfig
Source§impl<'de> Deserialize<'de> for GlobalConfig
impl<'de> Deserialize<'de> for GlobalConfig
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 GlobalConfig
impl PartialEq for GlobalConfig
Source§impl Serialize for GlobalConfig
impl Serialize for GlobalConfig
impl Eq for GlobalConfig
impl StructuralPartialEq for GlobalConfig
Auto Trait Implementations§
impl Freeze for GlobalConfig
impl RefUnwindSafe for GlobalConfig
impl Send for GlobalConfig
impl Sync for GlobalConfig
impl Unpin for GlobalConfig
impl UnwindSafe for GlobalConfig
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§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
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self file descriptor. Read moreSource§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>
Converts
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>
Converts
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 more