Documentation
¶
Overview ¶
Package series is the series-identity index: it maps a content-addressed signal.SeriesID to its full identity (signal.Series — Resource + Scope + data-point attributes) and back. Adding a series is idempotent (the id is the hash of the identity), so the same series ingested twice — or replayed from the WAL — resolves to one entry. The stored identity lets a query reconstruct a series' labels from an id.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
Index maps signal.SeriesID → signal.Series. The zero value is not usable; create one with New. Not safe for concurrent use; callers own synchronization.
func (*Index) Add ¶
Add interns a series identity and returns its signal.SeriesID. It is idempotent: re-adding an equal identity returns the same id without storing a second copy. The identity's byte payloads are interned (not cloned) and its resource/scope sets are deduplicated, so the caller may reuse its buffers and each distinct string — and each distinct resource/scope — is stored once across the whole index.
func (*Index) ForEach ¶
ForEach calls fn for each (id, identity) pair. Iteration order is unspecified.