C# Класс AdysTech.InfluxDB.Client.Net.InfluxDBClient

Provides asynchronous interaction channel with InfluxDB engine
Наследование: IInfluxDBClient, IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CreateContinuousQueryAsync ( IInfluxContinuousQuery cq ) : Task

Creates a Continuous Queries

CreateDatabaseAsync ( string dbName ) : Task

Creates the specified database

CreateRetentionPolicyAsync ( IInfluxRetentionPolicy policy ) : Task

Creates a retention policy

Dispose ( ) : void
DropContinuousQueryAsync ( IInfluxContinuousQuery cq ) : Task
GetContinuousQueriesAsync ( ) : Task>

Gets the list of Continuous Queries currently in efect

GetInfluxDBNamesAsync ( ) : Task>

Queries and Gets list of all existing databases in the Influx server instance

GetInfluxDBStructureAsync ( string dbName ) : Task

Gets the whole DB structure for the given databse in Influx.

GetRetentionPoliciesAsync ( string dbName ) : Task>

Gets the list of retention policies present in a DB

GetServerVersionAsync ( ) : Task

InfluxDB engine version

InfluxDBClient ( string InfluxUrl ) : System

Creates the InfluxDB Client

InfluxDBClient ( string InfluxUrl, string UserName, string Password ) : System

Creates the InfluxDB Client

PostPointAsync ( string dbName, IInfluxDatapoint point ) : Task

Posts an InfluxDataPoint to given measurement

PostPointsAsync ( string dbName, IEnumerable Points ) : Task

Posts series of InfluxDataPoints to given measurement, in batches of 255

PostRawValueAsync ( string dbName, TimePrecision precision, string content ) : Task

Posts raw write request to Influx.

QueryMultiSeriesAsync ( string dbName, string measurementQuery, TimePrecision precision = TimePrecision.Nanoseconds ) : Task>

Queries Influx DB and gets a time series data back. Ideal for fetching measurement values. The return list is of InfluxSeries, and each element in there will have properties named after columns in series

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Приватные методы

Метод Описание
GetAsync ( string>.Dictionary Query ) : Task
PostAsync ( string>.Dictionary EndPoint, ByteArrayContent requestContent ) : Task
PostPointsAsync ( string dbName, TimePrecision precision, string retention, IEnumerable points ) : Task
QueryDBAsync ( string dbName, string measurementQuery ) : Task>

Описание методов

CreateContinuousQueryAsync() публичный Метод

Creates a Continuous Queries
public CreateContinuousQueryAsync ( IInfluxContinuousQuery cq ) : Task
cq IInfluxContinuousQuery An instance of the Continuous Query, DBName, Name, Query must be set
Результат Task

CreateDatabaseAsync() публичный Метод

Creates the specified database
When Influx needs authentication, and no user name password is supplied or auth fails all other HTTP exceptions
public CreateDatabaseAsync ( string dbName ) : Task
dbName string
Результат Task

CreateRetentionPolicyAsync() публичный Метод

Creates a retention policy
public CreateRetentionPolicyAsync ( IInfluxRetentionPolicy policy ) : Task
policy IInfluxRetentionPolicy An instance of the Retention Policy, DBName, Name and Duration must be set
Результат Task

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

protected Dispose ( bool disposing ) : void
disposing bool
Результат void

DropContinuousQueryAsync() публичный Метод

public DropContinuousQueryAsync ( IInfluxContinuousQuery cq ) : Task
cq IInfluxContinuousQuery
Результат Task

GetContinuousQueriesAsync() публичный Метод

Gets the list of Continuous Queries currently in efect
public GetContinuousQueriesAsync ( ) : Task>
Результат Task>

GetInfluxDBNamesAsync() публичный Метод

Queries and Gets list of all existing databases in the Influx server instance
When Influx needs authentication, and no user name password is supplied or auth fails all other HTTP exceptions InfluxDB service is not available on the port mentioned
public GetInfluxDBNamesAsync ( ) : Task>
Результат Task>

GetInfluxDBStructureAsync() публичный Метод

Gets the whole DB structure for the given databse in Influx.
When Influx needs authentication, and no user name password is supplied or auth fails all other HTTP exceptions
public GetInfluxDBStructureAsync ( string dbName ) : Task
dbName string Name of the database
Результат Task

GetRetentionPoliciesAsync() публичный Метод

Gets the list of retention policies present in a DB
public GetRetentionPoliciesAsync ( string dbName ) : Task>
dbName string Name of the database
Результат Task>

GetServerVersionAsync() публичный Метод

InfluxDB engine version
public GetServerVersionAsync ( ) : Task
Результат Task

InfluxDBClient() публичный Метод

Creates the InfluxDB Client
public InfluxDBClient ( string InfluxUrl ) : System
InfluxUrl string Url for the Inflex Server, e.g. localhost:8086
Результат System

InfluxDBClient() публичный Метод

Creates the InfluxDB Client
public InfluxDBClient ( string InfluxUrl, string UserName, string Password ) : System
InfluxUrl string Url for the Inflex Server, e.g. http://localhost:8086
UserName string User name to authenticate InflexDB
Password string password
Результат System

PostPointAsync() публичный Метод

Posts an InfluxDataPoint to given measurement
When Influx needs authentication, and no user name password is supplied or auth fails all other HTTP exceptions
public PostPointAsync ( string dbName, IInfluxDatapoint point ) : Task
dbName string InfluxDB database name
point IInfluxDatapoint Influx data point to be written
Результат Task

PostPointsAsync() публичный Метод

Posts series of InfluxDataPoints to given measurement, in batches of 255
When Influx needs authentication, and no user name password is supplied or auth fails all other HTTP exceptions
public PostPointsAsync ( string dbName, IEnumerable Points ) : Task
dbName string InfluxDB database name
Points IEnumerable Collection of Influx data points to be written
Результат Task

PostRawValueAsync() публичный Метод

Posts raw write request to Influx.
public PostRawValueAsync ( string dbName, TimePrecision precision, string content ) : Task
dbName string Name of the Database
precision TimePrecision Unit of the timestamp, Hour->nanosecond
content string Raw request, as per Line Protocol
Результат Task

QueryMultiSeriesAsync() публичный Метод

Queries Influx DB and gets a time series data back. Ideal for fetching measurement values. The return list is of InfluxSeries, and each element in there will have properties named after columns in series
public QueryMultiSeriesAsync ( string dbName, string measurementQuery, TimePrecision precision = TimePrecision.Nanoseconds ) : Task>
dbName string Name of the database
measurementQuery string Query text, Only results with single series are supported for now
precision TimePrecision epoch precision of the data set
Результат Task>