Versions in this module Expand all Collapse all v0 v0.54.2 Jan 28, 2025 Changes in this version + const DefaultSegmentSize + const WblDirName + var ErrIgnorable = errors.New("ignore me") + func DeleteCheckpoints(dir string, maxIndex int) error + func LastCheckpoint(dir string) (string, int, error) + func NewSegmentBufReader(segs ...*Segment) io.ReadCloser + func NewSegmentBufReaderWithOffset(offset int, segs ...*Segment) (io.ReadCloser, error) + func NewSegmentsRangeReader(sr ...SegmentRange) (io.ReadCloser, error) + func NewSegmentsReader(dir string) (io.ReadCloser, error) + func SegmentName(dir string, i int) string + func Segments(wlDir string) (first, last int, err error) + type CheckpointStats struct + DroppedExemplars int + DroppedMetadata int + DroppedSamples int + DroppedSeries int + DroppedTombstones int + TotalExemplars int + TotalMetadata int + TotalSamples int + TotalSeries int + TotalTombstones int + func Checkpoint(logger log.Logger, w *WL, from, to int, ...) (*CheckpointStats, error) + type CompressionType string + const CompressionNone + const CompressionSnappy + const CompressionZstd + func ParseCompressionType(compress bool, compressType string) CompressionType + type CorruptionErr struct + Dir string + Err error + Offset int64 + Segment int + func (e *CorruptionErr) Error() string + func (e *CorruptionErr) Unwrap() error + type LiveReader struct + func NewLiveReader(logger log.Logger, metrics *LiveReaderMetrics, r io.Reader) *LiveReader + func (r *LiveReader) Err() error + func (r *LiveReader) Next() bool + func (r *LiveReader) Offset() int64 + func (r *LiveReader) Record() []byte + type LiveReaderMetrics struct + func NewLiveReaderMetrics(reg prometheus.Registerer) *LiveReaderMetrics + type Reader struct + func NewReader(r io.Reader) *Reader + func (r *Reader) Err() error + func (r *Reader) Next() bool + func (r *Reader) Offset() int64 + func (r *Reader) Record() []byte + func (r *Reader) Segment() int + type Segment struct + func CreateSegment(dir string, k int) (*Segment, error) + func OpenReadSegment(fn string) (*Segment, error) + func OpenWriteSegment(logger log.Logger, dir string, k int) (*Segment, error) + func (s *Segment) Dir() string + func (s *Segment) Index() int + type SegmentFile interface + Stat func() (os.FileInfo, error) + Sync func() error + type SegmentRange struct + Dir string + First int + Last int + type WL struct + WriteNotified WriteNotified + func New(logger log.Logger, reg prometheus.Registerer, dir string, ...) (*WL, error) + func NewSize(logger log.Logger, reg prometheus.Registerer, dir string, segmentSize int, ...) (*WL, error) + func Open(logger log.Logger, dir string) (*WL, error) + func (w *WL) Close() (err error) + func (w *WL) CompressionType() CompressionType + func (w *WL) Dir() string + func (w *WL) LastSegmentAndOffset() (seg, offset int, err error) + func (w *WL) Log(recs ...[]byte) error + func (w *WL) NextSegment() (int, error) + func (w *WL) NextSegmentSync() (int, error) + func (w *WL) Repair(origErr error) error + func (w *WL) SetWriteNotified(wn WriteNotified) + func (w *WL) Size() (int64, error) + func (w *WL) Sync() error + func (w *WL) Truncate(i int) (err error) + type Watcher struct + MaxSegment int + func NewWatcher(metrics *WatcherMetrics, readerMetrics *LiveReaderMetrics, logger log.Logger, ...) *Watcher + func (w *Watcher) Notify() + func (w *Watcher) Run() error + func (w *Watcher) SetStartTime(t time.Time) + func (w *Watcher) Start() + func (w *Watcher) Stop() + type WatcherMetrics struct + func NewWatcherMetrics(reg prometheus.Registerer) *WatcherMetrics + type WriteNotified interface + Notify func() + type WriteTo interface + Append func([]record.RefSample) bool + AppendExemplars func([]record.RefExemplar) bool + AppendFloatHistograms func([]record.RefFloatHistogramSample) bool + AppendHistograms func([]record.RefHistogramSample) bool + SeriesReset func(int) + StoreMetadata func([]record.RefMetadata) + StoreSeries func([]record.RefSeries, int) + UpdateSeriesSegment func([]record.RefSeries, int) v0.54.1-promotel-v1.0.0 Jan 28, 2025