public List <Topology> Get() { var tree = client.Get("topology"); var result = new List <Topology>(); Dfs(tree, string.Empty, result, parser); return(result); }
private static void InitializeMetricsProviderIfNeeded(IClusterClientConfiguration configuration, IMetricContext?metricContext, IClusterConfigClient clusterConfigClient) { if (metricContext == null && MetricContextProvider.IsConfigured) { metricContext = MetricContextProvider.Get(); } if (metricContext != null) { var environment = clusterConfigClient.Get(SingularConstants.EnvironmentNamePath)?.Value; if (environment == SingularConstants.ProdEnvironment || environment == SingularConstants.CloudEnvironment) { var metricsProvider = MetricsProviderCache.Get(metricContext, environment, SloMetricsClientName); configuration.AddRequestModule(new MetricsModule(metricsProvider)); } } }