diff options
author | Roberto Hidalgo <un@rob.mx> | 2023-05-10 20:11:14 -0600 |
---|---|---|
committer | Roberto Hidalgo <un@rob.mx> | 2023-05-22 08:57:15 -0600 |
commit | 6b69404f1a53b927b4ce3cabdbb41f58e832a963 (patch) | |
tree | f62eb9f5d42cfa4d1e42884f9e91c9c185411b6a /src/util | |
parent | 011f4730483dc7b75720c7b800702ea7c1a925c1 (diff) | |
download | garage-6b69404f1a53b927b4ce3cabdbb41f58e832a963.tar.gz garage-6b69404f1a53b927b4ce3cabdbb41f58e832a963.zip |
rename mode to consul_http_api
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/config.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/util/config.rs b/src/util/config.rs index 632d22ef..8b723e47 100644 --- a/src/util/config.rs +++ b/src/util/config.rs @@ -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 |