为收集配置添加一个检查配置清单的方法

This commit is contained in:
2025-11-23 17:55:48 +08:00
parent 5f0dcc54f8
commit beeab4b0fe

View File

@@ -114,3 +114,14 @@ pub struct LayerConfig {
pub node_name: String,
pub index_name: String,
}
impl LayerConfig {
/// 检查配置文件是否有值
pub fn is_exist(&self) -> bool {
!self.zinc_search_host.is_empty()
|| !self.username.is_empty()
|| !self.password.is_empty()
|| !self.node_name.is_empty()
|| !self.index_name.is_empty()
}
}