Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockConfig ¶
BlockConfig represents the configuration to generate a SeriesBlock
type Options ¶
type Options interface { // SetClockOptions sets the clock options SetClockOptions(value clock.Options) Options // ClockOptions returns the clock options ClockOptions() clock.Options // SetRetentionPeriod sets how long we intend to keep data in memory SetRetentionPeriod(value time.Duration) Options // RetentionPeriod returns how long we intend to keep data in memory RetentionPeriod() time.Duration // SetBlockSize sets the blockSize SetBlockSize(value time.Duration) Options // BlockSize returns the blockSize BlockSize() time.Duration // SetFilePathPrefix sets the file path prefix for sharded TSDB files SetFilePathPrefix(value string) Options // FilePathPrefix returns the file path prefix for sharded TSDB files FilePathPrefix() string // SetNewFileMode sets the new file mode SetNewFileMode(value os.FileMode) Options // NewFileMode returns the new file mode NewFileMode() os.FileMode // SetNewDirectoryMode sets the new directory mode SetNewDirectoryMode(value os.FileMode) Options // NewDirectoryMode returns the new directory mode NewDirectoryMode() os.FileMode // SetWriterBufferSize sets the buffer size for writing TSDB files SetWriterBufferSize(value int) Options // WriterBufferSize returns the buffer size for writing TSDB files WriterBufferSize() int // SetWriteEmptyShards sets whether writes are done even for empty start periods SetWriteEmptyShards(bool) Options // WriteEmptyShards returns whether writes are done even for empty start periods WriteEmptyShards() bool // SetEncoderPool sets the contextPool SetEncoderPool(value encoding.EncoderPool) Options // EncoderPool returns the contextPool EncoderPool() encoding.EncoderPool }
Options represent the parameters needed for the Writer
type SeriesBlock ¶
type SeriesBlock []Series
SeriesBlock is a collection of Series'
func Block ¶
func Block(conf BlockConfig) SeriesBlock
Block generates a SeriesBlock based on provided config
func (SeriesBlock) Less ¶
func (l SeriesBlock) Less(i, j int) bool
func (SeriesBlock) Swap ¶
func (l SeriesBlock) Swap(i, j int)
type SeriesBlocksByStart ¶
type SeriesBlocksByStart map[xtime.UnixNano]SeriesBlock
SeriesBlocksByStart is a map of time -> SeriesBlock
func BlocksByStart ¶
func BlocksByStart(confs []BlockConfig) SeriesBlocksByStart
BlocksByStart generates a map of SeriesBlocks keyed by Start time for the provided configs
type SeriesDataPoint ¶
SeriesDataPoint represents a single data point of a generated series of data
type SeriesDataPointsByTime ¶
type SeriesDataPointsByTime []SeriesDataPoint
SeriesDataPointsByTime are a sorted list of SeriesDataPoints
func ToPointsByTime ¶
func ToPointsByTime(seriesMaps SeriesBlocksByStart) SeriesDataPointsByTime
ToPointsByTime converts a SeriesBlocksByStart to SeriesDataPointsByTime
func (SeriesDataPointsByTime) Dearrange ¶
func (l SeriesDataPointsByTime) Dearrange(percent float64) SeriesDataPointsByTime
Dearrange de-arranges the list by the defined percent.
func (SeriesDataPointsByTime) Len ¶
func (l SeriesDataPointsByTime) Len() int
func (SeriesDataPointsByTime) Less ¶
func (l SeriesDataPointsByTime) Less(i, j int) bool
func (SeriesDataPointsByTime) Swap ¶
func (l SeriesDataPointsByTime) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.