Documentation
¶
Index ¶
- func SegmentKey(dst []byte, labels []*prompb.Label, hash uint64) ([]byte, error)
- type LocalStore
- func (s *LocalStore) Close() error
- func (s *LocalStore) GetWAL(ctx context.Context, key []byte) (*wal.WAL, error)
- func (s *LocalStore) Import(filename string, body io.ReadCloser) (int, error)
- func (s *LocalStore) Index() *wal.Index
- func (s *LocalStore) Open(ctx context.Context) error
- func (s *LocalStore) PrefixesByAge() []string
- func (s *LocalStore) Remove(path string) error
- func (s *LocalStore) WALCount() int
- func (s *LocalStore) WriteNativeLogs(ctx context.Context, logs *types.LogBatch) error
- func (s *LocalStore) WriteOTLPLogs(ctx context.Context, database, table string, logs *otlp.Logs) error
- func (s *LocalStore) WriteTimeSeries(ctx context.Context, ts []*prompb.TimeSeries) error
- type Store
- type StoreOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LocalStore ¶
type LocalStore struct {
// contains filtered or unexported fields
}
LocalStore provides local storage of time series data. It manages Write Ahead Logs (WALs) for each metric.
func NewLocalStore ¶
func NewLocalStore(opts StoreOpts) *LocalStore
func (*LocalStore) Close ¶
func (s *LocalStore) Close() error
func (*LocalStore) Import ¶
func (s *LocalStore) Import(filename string, body io.ReadCloser) (int, error)
func (*LocalStore) Index ¶
func (s *LocalStore) Index() *wal.Index
func (*LocalStore) PrefixesByAge ¶
func (s *LocalStore) PrefixesByAge() []string
func (*LocalStore) Remove ¶
func (s *LocalStore) Remove(path string) error
func (*LocalStore) WALCount ¶
func (s *LocalStore) WALCount() int
func (*LocalStore) WriteNativeLogs ¶
func (*LocalStore) WriteOTLPLogs ¶
func (*LocalStore) WriteTimeSeries ¶
func (s *LocalStore) WriteTimeSeries(ctx context.Context, ts []*prompb.TimeSeries) error
type Store ¶
type Store interface {
service.Component
// WriteTimeSeries writes a batch of time series to the Store.
WriteTimeSeries(ctx context.Context, ts []*prompb.TimeSeries) error
// WriteOTLPLogs writes a batch of logs to the Store.
WriteOTLPLogs(ctx context.Context, database, table string, logs *otlp.Logs) error
// WriteNativeLogs writes a batch of logs to the Store.
WriteNativeLogs(ctx context.Context, logs *types.LogBatch) error
// Import imports a file into the LocalStore and returns the number of bytes stored.
Import(filename string, body io.ReadCloser) (int, error)
}
Click to show internal directories.
Click to hide internal directories.