14 releases

0.1.14 Jul 13, 2021
0.1.13 Jul 12, 2021
0.1.7 Jun 18, 2021
0.1.1 May 27, 2021

#2 in #true

Download history 47/week @ 2024-02-22 8/week @ 2024-02-29

55 downloads per month

MIT/Apache

42KB
748 lines

consul api

consul config, consul.yaml

config:
  address: http://127.0.0.1:8500
  datacenter: dc1
  wait_time: 5s

watch_services:
  - service_name: hyat_rust
    passing_only: true
    tag: ''

load config

ConsulConfig::load_config("consul.yaml").await?;

consul watch

let consul_config = CONSUL_CONFIG.clone();
let consul_config = consul_config.read().await;
consul_config.watch_services().await?;

Dependencies

~16–30MB
~467K SLoC