You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
574 B
19 lines
574 B
using Infrastructure.Extensions;
|
|
using Microsoft.Extensions.Configuration;
|
|
using System;
|
|
using Vibrant.InfluxDB.Client;
|
|
|
|
namespace Platform.Services
|
|
{
|
|
public static class InfluxDBHelper
|
|
{
|
|
public static InfluxClient CreateClient(IConfiguration cfg)
|
|
{
|
|
var connectionString = cfg.GetConnectionStringValues("InfluxDB");
|
|
var url = connectionString["url"];
|
|
var usr = connectionString["usr"];
|
|
var pwd = connectionString["pwd"];
|
|
return new InfluxClient(new Uri(url), usr, pwd);
|
|
}
|
|
}
|
|
} |