Esempio n. 1
0
 public PooledGraphiteClient([NotNull] IGraphiteClientSettings graphiteClientSettings)
 {
     if (graphiteClientSettings.Enabled && graphiteClientSettings.GraphiteEndPoint != null)
     {
         InitializePool(graphiteClientSettings.GraphiteEndPoint, graphiteClientSettings.GraphiteProtocol, graphiteClientSettings.GlobalPathPrefix);
     }
 }
 public PooledStatsDClient([NotNull] IGraphiteClientSettings graphiteClientSettings)
 {
     pool        = null;
     innerClient = null;
     prefixes    = null;
     if (graphiteClientSettings.Enabled && graphiteClientSettings.StatsDEndPoint != null)
     {
         var hostnameResolver = new HostnameResolverWithCache(TimeSpan.FromHours(1), new SimpleDnsResolver());
         pool = new Pool <StatsDClient>(x => new StatsDClient(hostnameResolver.Resolve(graphiteClientSettings.StatsDEndPoint.Host), graphiteClientSettings.StatsDEndPoint.Port, graphiteClientSettings.GlobalPathPrefix));
     }
 }
 public GraphiteAnnotationsClient([NotNull] IGraphiteClientSettings graphiteClientSettings)
 {
     this.graphiteClientSettings = graphiteClientSettings;
 }