forked from NationTech/harmony
Introduce a new module and interface for serving files via TFTP in the HAClusterTopology structure. This includes adding the necessary dependencies, creating the `TftpServer` trait, implementing it where appropriate, and integrating its usage within the topology struct. Reviewed-on: https://git.nationtech.io/NationTech/harmony/pulls/10 Co-authored-by: Jean-Gabriel Gill-Couture <jg@nationtech.io> Co-committed-by: Jean-Gabriel Gill-Couture <jg@nationtech.io>
20 lines
509 B
Rust
20 lines
509 B
Rust
use thiserror::Error;
|
|
|
|
#[derive(Error, Debug)]
|
|
pub enum Error {
|
|
#[error("XML error: {0}")]
|
|
Xml(String),
|
|
#[error("SSH error: {0}")]
|
|
Ssh(#[from] russh::Error),
|
|
#[error("SSH Client error: {0}")]
|
|
SftpClient(#[from] russh_sftp::client::error::Error),
|
|
#[error("Command failed : {0}")]
|
|
Command(String),
|
|
#[error("I/O error: {0}")]
|
|
Io(#[from] std::io::Error),
|
|
#[error("Config error: {0}")]
|
|
Config(String),
|
|
#[error("Unexpected error: {0}")]
|
|
Unexpected(String),
|
|
}
|