2023-03-21 17:00:01 +00:00
|
|
|
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;
|
2023-03-21 17:00:01 +00:00
|
|
|
|
|
|
|
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>>;
|
2023-03-21 17:00:01 +00:00
|
|
|
}
|