forked from Deuxfleurs/garage
move things around
This commit is contained in:
parent
5d8d393054
commit
2da8786f54
1 changed files with 8 additions and 9 deletions
|
@ -290,6 +290,14 @@ impl System {
|
||||||
|
|
||||||
let system_endpoint = netapp.endpoint(SYSTEM_RPC_PATH.into());
|
let system_endpoint = netapp.endpoint(SYSTEM_RPC_PATH.into());
|
||||||
|
|
||||||
|
#[cfg(feature = "consul-discovery")]
|
||||||
|
let consul_discovery = match &config.consul_discovery {
|
||||||
|
Some(cfg) => Some(
|
||||||
|
ConsulDiscovery::new(cfg.clone())
|
||||||
|
.ok_or_message("Invalid Consul discovery configuration")?,
|
||||||
|
),
|
||||||
|
None => None,
|
||||||
|
};
|
||||||
#[cfg(not(feature = "consul-discovery"))]
|
#[cfg(not(feature = "consul-discovery"))]
|
||||||
if config.consul_discovery.is_some() {
|
if config.consul_discovery.is_some() {
|
||||||
warn!("Consul discovery is not enabled in this build.");
|
warn!("Consul discovery is not enabled in this build.");
|
||||||
|
@ -300,15 +308,6 @@ impl System {
|
||||||
warn!("Kubernetes discovery is not enabled in this build.");
|
warn!("Kubernetes discovery is not enabled in this build.");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "consul-discovery")]
|
|
||||||
let consul_discovery = match &config.consul_discovery {
|
|
||||||
Some(cfg) => Some(
|
|
||||||
ConsulDiscovery::new(cfg.clone())
|
|
||||||
.ok_or_message("Invalid Consul discovery configuration")?,
|
|
||||||
),
|
|
||||||
None => None,
|
|
||||||
};
|
|
||||||
|
|
||||||
let sys = Arc::new(System {
|
let sys = Arc::new(System {
|
||||||
id: netapp.id.into(),
|
id: netapp.id.into(),
|
||||||
persist_cluster_layout,
|
persist_cluster_layout,
|
||||||
|
|
Loading…
Reference in a new issue