influxdb/tsdb/config.go

29 lines
817 B
Go
Raw Normal View History

2018-09-25 00:52:40 +00:00
package tsdb
import (
"github.com/influxdata/influxdb/query"
2018-09-25 00:52:40 +00:00
)
// EOF represents a "not found" key returned by a Cursor.
const EOF = query.ZeroTime
2019-03-20 16:25:24 +00:00
const (
// DefaultLargeSeriesWriteThreshold is the number of series per write
// that requires the series index be pregrown before insert.
DefaultLargeSeriesWriteThreshold = 10000
)
// Config contains all of the configuration related to tsdb.
type Config struct {
// LargeSeriesWriteThreshold is the threshold before a write requires
// preallocation to improve throughput. Currently used in the series file.
LargeSeriesWriteThreshold int `toml:"large-series-write-threshold"`
}
// NewConfig return a new instance of config with default settings.
func NewConfig() Config {
return Config{
LargeSeriesWriteThreshold: DefaultLargeSeriesWriteThreshold,
}
}