public InfluxDbProvider(InfluxDbConfig influxDbConfig)
        {
            if (influxDbConfig == null)
            {
                throw new ArgumentNullException("influxDbConfig");
            }

            this.dbName         = influxDbConfig.DbName;
            this.influxDbClient = new InfluxDbClient(influxDbConfig.Host,
                                                     influxDbConfig.UserName,
                                                     influxDbConfig.Password,
                                                     InfluxDbVersion.Latest);
        }
예제 #2
0
 public MetricsService(IOptions <InfluxDbConfig> config, ILogger <MetricsService> log)
 {
     this.config = config.Value;
     this.log    = log;
 }