use serde::{Deserialize, Serialize};
#[derive(Debug, Default, Serialize, Deserialize, Clone)]
pub struct ServiceConfig {
pub version: String,
pub group: String,
pub protocol: String,
pub interface: String,
pub tag: String,
}
impl ServiceConfig {
pub fn interface(self, interface: String) -> Self {
Self { interface, ..self }
}
pub fn version(self, version: String) -> Self {
Self { version, ..self }
}
pub fn group(self, group: String) -> Self {
Self { group, ..self }
}
pub fn protocol(self, protocol: String) -> Self {
Self { protocol, ..self }
}
pub fn tag(self, tag: String) -> Self {
Self { tag, ..self }
}
}