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(); }
public ConsulHeartbeatManager(ConsulEcwidClient client) { _client = client; }