mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-21 10:26:36 +00:00
rename mode to consul_http_api
This commit is contained in:
+8
-8
@@ -136,22 +136,22 @@ pub struct AdminConfig {
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug, Clone)]
|
||||
pub enum ConsulDiscoveryMode {
|
||||
pub enum ConsulDiscoveryAPI {
|
||||
#[serde(rename_all = "lowercase")]
|
||||
Node,
|
||||
Service,
|
||||
Catalog,
|
||||
Agent,
|
||||
}
|
||||
impl ConsulDiscoveryMode {
|
||||
impl ConsulDiscoveryAPI {
|
||||
fn default() -> Self {
|
||||
ConsulDiscoveryMode::Node
|
||||
ConsulDiscoveryAPI::Catalog
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug, Clone)]
|
||||
pub struct ConsulDiscoveryConfig {
|
||||
/// Mode of consul operation: either `node` (the default) or `service`
|
||||
#[serde(default = "ConsulDiscoveryMode::default")]
|
||||
pub mode: ConsulDiscoveryMode,
|
||||
/// The consul api to use when registering: either `catalog` (the default) or `agent`
|
||||
#[serde(default = "ConsulDiscoveryAPI::default")]
|
||||
pub consul_http_api: ConsulDiscoveryAPI,
|
||||
/// Consul http or https address to connect to to discover more peers
|
||||
pub consul_http_addr: String,
|
||||
/// Consul service name to use
|
||||
|
||||
Reference in New Issue
Block a user