public FailoverReactor(HostReactor hostReactor, string cacheDir) { _hostReactor = hostReactor; _failoverDir = Path.Combine(cacheDir, FAILOVER_PATH); Init(); }
public NacosNamingService(NamingConfig config, IHttpClientFactory httpClientFactory) { _config = config; _eventDispatcher = new EventDispatcher(); _namingProxy = new NamingProxy(config, new FastHttp(httpClientFactory, config)); _beatReactor = new BeatReactor(_namingProxy); _hostReactor = new HostReactor(_eventDispatcher, _namingProxy, config.CacheDir, config.LoadCacheAtStart); }
public HostReactorTest() { _config = new NamingConfig { EndPoint = "http://localhost:8848", ServerAddr = new List <string>() { "http://localhost:8848" }, Namespace = "vip56" }; MockData(); var namingProxy = MockNamingProxy(); var eventDispatcher = new EventDispatcher(); _hostReactor = new HostReactor(eventDispatcher, namingProxy, Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "nacos")); }