pub struct ConfigManager { /* private fields */ }Expand description
配置管理器
Implementations§
Source§impl ConfigManager
impl ConfigManager
Sourcepub fn get_config(&self) -> Result<DockerConfig>
pub fn get_config(&self) -> Result<DockerConfig>
获取配置
Sourcepub fn save_config(&self, config: &DockerConfig) -> Result<()>
pub fn save_config(&self, config: &DockerConfig) -> Result<()>
保存配置
Sourcepub fn create_config(
&self,
name: &str,
data: &str,
labels: HashMap<String, String>,
) -> Result<ConfigInfo>
pub fn create_config( &self, name: &str, data: &str, labels: HashMap<String, String>, ) -> Result<ConfigInfo>
创建配置
Sourcepub fn update_config(
&self,
config_id: &str,
data: &str,
labels: HashMap<String, String>,
) -> Result<ConfigInfo>
pub fn update_config( &self, config_id: &str, data: &str, labels: HashMap<String, String>, ) -> Result<ConfigInfo>
更新配置
Sourcepub fn delete_config(&self, config_id: &str) -> Result<()>
pub fn delete_config(&self, config_id: &str) -> Result<()>
删除配置
Sourcepub fn get_config_info(&self, config_id: &str) -> Result<ConfigInfo>
pub fn get_config_info(&self, config_id: &str) -> Result<ConfigInfo>
获取配置详细信息
Sourcepub fn list_configs(&self) -> Result<Vec<ConfigInfo>>
pub fn list_configs(&self) -> Result<Vec<ConfigInfo>>
列出所有配置
Sourcepub fn create_secret(
&self,
name: &str,
data: &str,
labels: HashMap<String, String>,
) -> Result<SecretInfo>
pub fn create_secret( &self, name: &str, data: &str, labels: HashMap<String, String>, ) -> Result<SecretInfo>
创建密钥
Sourcepub fn delete_secret(&self, secret_id: &str) -> Result<()>
pub fn delete_secret(&self, secret_id: &str) -> Result<()>
删除密钥
Sourcepub fn get_secret_info(&self, secret_id: &str) -> Result<SecretInfo>
pub fn get_secret_info(&self, secret_id: &str) -> Result<SecretInfo>
获取密钥详细信息
Sourcepub fn list_secrets(&self) -> Result<Vec<SecretInfo>>
pub fn list_secrets(&self) -> Result<Vec<SecretInfo>>
列出所有密钥
Sourcepub fn create_endpoint(
&self,
name: &str,
endpoint_type: EndpointType,
url: &str,
use_tls: bool,
tls_cert_path: Option<String>,
tls_key_path: Option<String>,
tls_ca_path: Option<String>,
auth_token: Option<String>,
labels: HashMap<String, String>,
) -> Result<EndpointInfo>
pub fn create_endpoint( &self, name: &str, endpoint_type: EndpointType, url: &str, use_tls: bool, tls_cert_path: Option<String>, tls_key_path: Option<String>, tls_ca_path: Option<String>, auth_token: Option<String>, labels: HashMap<String, String>, ) -> Result<EndpointInfo>
创建端点
Sourcepub fn update_endpoint(
&self,
endpoint_id: &str,
name: &str,
url: &str,
use_tls: bool,
tls_cert_path: Option<String>,
tls_key_path: Option<String>,
tls_ca_path: Option<String>,
auth_token: Option<String>,
labels: HashMap<String, String>,
) -> Result<EndpointInfo>
pub fn update_endpoint( &self, endpoint_id: &str, name: &str, url: &str, use_tls: bool, tls_cert_path: Option<String>, tls_key_path: Option<String>, tls_ca_path: Option<String>, auth_token: Option<String>, labels: HashMap<String, String>, ) -> Result<EndpointInfo>
更新端点
Sourcepub fn delete_endpoint(&self, endpoint_id: &str) -> Result<()>
pub fn delete_endpoint(&self, endpoint_id: &str) -> Result<()>
删除端点
Sourcepub fn get_endpoint_info(&self, endpoint_id: &str) -> Result<EndpointInfo>
pub fn get_endpoint_info(&self, endpoint_id: &str) -> Result<EndpointInfo>
获取端点详细信息
Sourcepub fn list_endpoints(&self) -> Result<Vec<EndpointInfo>>
pub fn list_endpoints(&self) -> Result<Vec<EndpointInfo>>
列出所有端点
Sourcepub fn test_endpoint_connection(
&self,
endpoint_id: &str,
) -> Result<EndpointStatus>
pub fn test_endpoint_connection( &self, endpoint_id: &str, ) -> Result<EndpointStatus>
测试端点连接
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConfigManager
impl RefUnwindSafe for ConfigManager
impl Send for ConfigManager
impl Sync for ConfigManager
impl Unpin for ConfigManager
impl UnsafeUnpin for ConfigManager
impl UnwindSafe for ConfigManager
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