herolib_rust/service_manager/src/systemd.rs
2025-07-01 09:11:45 +02:00

42 lines
1.6 KiB
Rust

use crate::{ServiceConfig, ServiceManager, ServiceManagerError, ServiceStatus};
use async_trait::async_trait;
#[derive(Debug)]
pub struct SystemdServiceManager;
impl SystemdServiceManager {
pub fn new() -> Self {
Self
}
}
#[async_trait]
impl ServiceManager for SystemdServiceManager {
async fn start(&self, _config: &ServiceConfig) -> Result<(), ServiceManagerError> {
Err(ServiceManagerError::Other("Systemd implementation not yet complete".to_string()))
}
async fn stop(&self, _service_name: &str) -> Result<(), ServiceManagerError> {
Err(ServiceManagerError::Other("Systemd implementation not yet complete".to_string()))
}
async fn restart(&self, _service_name: &str) -> Result<(), ServiceManagerError> {
Err(ServiceManagerError::Other("Systemd implementation not yet complete".to_string()))
}
async fn status(&self, _service_name: &str) -> Result<ServiceStatus, ServiceManagerError> {
Err(ServiceManagerError::Other("Systemd implementation not yet complete".to_string()))
}
async fn logs(&self, _service_name: &str, _lines: Option<usize>) -> Result<String, ServiceManagerError> {
Err(ServiceManagerError::Other("Systemd implementation not yet complete".to_string()))
}
async fn list(&self) -> Result<Vec<String>, ServiceManagerError> {
Err(ServiceManagerError::Other("Systemd implementation not yet complete".to_string()))
}
async fn remove(&self, _service_name: &str) -> Result<(), ServiceManagerError> {
Err(ServiceManagerError::Other("Systemd implementation not yet complete".to_string()))
}
}