trifid/tfclient/src/service/mod.rs

17 lines
483 B
Rust
Raw Normal View History

use std::error::Error;
use std::path::PathBuf;
pub mod codegen;
pub mod systemd;
2023-03-22 18:34:06 +00:00
pub mod detect;
pub mod entry;
pub mod windows;
pub mod macos;
pub mod runit;
pub trait ServiceManager {
2023-03-22 18:34:06 +00:00
fn install(&self, bin_path: PathBuf, name: &str, server_url: &str) -> Result<(), Box<dyn Error>>;
fn uninstall(&self, name: &str) -> Result<(), Box<dyn Error>>;
fn start(&self, name: &str) -> Result<(), Box<dyn Error>>;
fn stop(&self, name: &str) -> Result<(), Box<dyn Error>>;
}