1// This file and its contents are licensed under the Apache License 2.0. 2// Please see the included NOTICE for copyright information and 3// LICENSE for a copy of the license. 4 5package ingestor 6 7import "github.com/timescale/promscale/pkg/prompb" 8 9// DBInserter is responsible for ingesting the TimeSeries protobuf structs and 10// storing them in the database. 11type DBInserter interface { 12 // Ingest takes an array of TimeSeries and attepts to store it into the database. 13 // Returns the number of metrics ingested and any error encountered before finishing. 14 Ingest(*prompb.WriteRequest) (uint64, uint64, error) 15} 16