public static CallServer getCallServer(string zooKeeperURL) { if (_zk == null) { lock (_locker) { if (_zk == null) { _zk = new CallServer(zooKeeperURL); } } } return(_zk); }
public static string getTokenAuthAddress(string zooKeeperURL) { CallServer zk = CallTokenAuth.getCallServer(zooKeeperURL); TokenAuthWatcher watcher = CallTokenAuth.getWatcher(zooKeeperURL); string ipport = zk.getChild($"/{NodeName.TokenAuth}", Guid.NewGuid().ToString(), watcher); if (string.IsNullOrWhiteSpace(ipport)) { return(""); } else { return($"{http}://{ipport}"); } }
public void Dispose() { _zk = null; _watcher = null; }
public void Dispose() { _authAPIzk = null; _authAPIwatcher = null; }