store

package
v0.2.1-rc.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 25 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFull = errors.New("store buffer is full")
View Source
var ServiceDir = manifest.ServiceDir

ServiceDir is the manifest package's mapping, aliased for brevity.

Functions

This section is empty.

Types

type Options

type Options struct {
	DataDir       string
	MaxServices   int
	BufferBytes   int64
	FlushInterval time.Duration
	Logger        *slog.Logger
	Now           func() time.Time

	CompactInterval time.Duration
	SealMinFiles    int
	RetireGrace     time.Duration
	Retention       time.Duration
	MaxDiskBytes    int64
}

type Stats

type Stats struct {
	RecordsAccepted int64
	RecordsRejected int64
	SpansAccepted   int64
	SpansRejected   int64
	Flushes         int64
	FilesWritten    int64
	BytesWritten    int64
	Services        int
	Compactions     int64
	FilesRetired    int64
	BytesOnDisk     int64
	PendingBatches  int64
	WriteErrors     int64
	// DiskCapExceeded is true while the open hour alone is over the disk cap and writes are refused.
	DiskCapExceeded bool
}

type Store

type Store struct {
	// contains filtered or unexported fields
}

func Open

func Open(ctx context.Context, opts Options) (*Store, error)

func (*Store) AppendLogs

func (s *Store) AppendLogs(_ context.Context, ld plog.Logs) (int64, string, error)

func (*Store) AppendTraces

func (s *Store) AppendTraces(_ context.Context, td ptrace.Traces) (int64, string, error)

func (*Store) Close

func (s *Store) Close() error

func (*Store) Flush

func (s *Store) Flush(ctx context.Context) error

func (*Store) Maintain

func (s *Store) Maintain(ctx context.Context) error

Maintain runs one pass: flush, compaction and retention when due, then retired-file cleanup.

func (*Store) Run

func (s *Store) Run(ctx context.Context) error

func (*Store) Stats

func (s *Store) Stats() Stats

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL