Documentation
¶
Overview ¶
Package ingot is an embedded time-series database library for Go.
Index ¶
Constants ¶
const ( MetricHeadSeries = "ingot_head_series" MetricHeadChunksActive = "ingot_head_chunks_active" MetricBlocksTotal = "ingot_blocks_total" MetricCompactionsTotal = "ingot_compactions_total" MetricWALFsyncDurationS = "ingot_wal_fsync_duration_seconds" )
Self-instrumentation metric names.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Appender ¶
type Appender struct {
// contains filtered or unexported fields
}
Appender buffers samples and new series for atomic commit.
func (*Appender) Append ¶
Append adds a sample. If ref is 0, the series is resolved (or created) from ls.
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB is an embedded time-series database.
func (*DB) ApplyRetention ¶
func (db *DB) ApplyRetention()
ApplyRetention drops blocks whose data is older than the retention window. Exported for testing.
func (*DB) FlushOlderThan ¶
FlushOlderThan flushes sealed head chunks to an immutable block.
func (*DB) RunCompaction ¶
RunCompaction performs a single compaction cycle. Exported for testing.
type Options ¶
type Options struct {
Retention time.Duration
BlockDuration time.Duration
// Clock returns the current time in milliseconds. Defaults to
// time.Now().UnixMilli(). Injected for testing with simulated time.
Clock func() int64
}
Options configures a DB.
type Querier ¶
type Querier struct {
// contains filtered or unexported fields
}
Querier queries the DB over a time range.
type SampleIterator ¶
SampleIterator iterates over samples.
type Series ¶
type Series interface {
Labels() []labels.Label
Iterator() SampleIterator
}
Series represents a single time series.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
ingotctl
command
Command ingotctl provides CLI tools for inspecting and validating ingot blocks.
|
Command ingotctl provides CLI tools for inspecting and validating ingot blocks. |
|
ingothttp
command
Command ingothttp serves a minimal HTTP query API for an ingot database.
|
Command ingothttp serves a minimal HTTP query API for an ingot database. |
|
internal
|
|
|
chunkenc
Chunk encoding follows Prometheus tsdb/chunkenc.
|
Chunk encoding follows Prometheus tsdb/chunkenc. |
|
compact
Package compact implements levelled compaction and retention for ingot blocks.
|
Package compact implements levelled compaction and retention for ingot blocks. |
|
head
Package head implements the in-memory series store for the active write window, backed by a write-ahead log for crash safety.
|
Package head implements the in-memory series store for the active write window, backed by a write-ahead log for crash safety. |
|
index
Package index implements the binary index file format for ingot blocks.
|
Package index implements the binary index file format for ingot blocks. |
|
postings
Package postings provides set operations on sorted uint64 slices, used for combining postings lists from index lookups.
|
Package postings provides set operations on sorted uint64 slices, used for combining postings lists from index lookups. |
|
wal
Package wal implements a segmented write-ahead log for crash-safe persistence of time-series data.
|
Package wal implements a segmented write-ahead log for crash-safe persistence of time-series data. |
|
Package labels defines the data model for time-series label pairs.
|
Package labels defines the data model for time-series label pairs. |