Ejemplo n.º 1
0
        /// <summary>Write multiple serie points to the given database.</summary>
        /// <param name="database">The name of the database to write to.</param>
        /// <param name="points">A serie <see cref="Array{Point}" />.</param>
        /// <param name="retenionPolicy">The retenion policy.</param>
        /// <returns>TODO: comment</returns>
        public async Task <InfluxDbApiWriteResponse> WriteAsync(string database, Point[] points, string retenionPolicy = "default")
        {
            var request = new WriteRequest(_influxDbClient.GetFormatter())
            {
                Database        = database,
                Points          = points,
                RetentionPolicy = retenionPolicy
            };

            var result = await _influxDbClient.Write(NoErrorHandlers, request, ToTimePrecision(TimeUnit.Milliseconds));

            return(result);
        }
Ejemplo n.º 2
0
 /// <summary>
 ///     Write a Series to the given database.
 /// </summary>
 /// <param name="database">The name of the database to write to</param>
 /// <param name="precision">The precision used for the values.</param>
 /// <param name="series">An array of <see cref="Serie" /> to write</param>
 /// <returns></returns>
 public async Task <InfluxDbApiResponse> WriteAsync(string database, TimeUnit precision, params Serie[] series)
 {
     return(await _influxDbClient.Write(NoErrorHandlers, database, series, ToTimePrecision(precision)));
 }
 public async Task <InfluxDbApiWriteResponse> Write(IEnumerable <ApiResponseErrorHandlingDelegate> errorHandlers, WriteRequest request, string timePrecision)
 {
     return(await _influxDbClient.Write(errorHandlers, request, timePrecision));
 }