Exemple #1
0
        public ConsulRegistry(URL url)
        {
            var address = $"{url.Ip}:{url.Port}";

            if (string.IsNullOrEmpty(address))
            {
                throw new Exception("Invalid registry address ");
            }
            _client    = new ConsulEcwidClient(address);
            _url       = url;
            _heartbeat = new ConsulHeartbeatManager(_client);
            _heartbeat.Start();
            _source = new CancellationTokenSource();
        }
Exemple #2
0
 public ConsulHeartbeatManager(ConsulEcwidClient client)
 {
     _client = client;
 }