Documentation ¶
Index ¶
- Variables
- func SubDirectory(base string) string
- type Storage
- func (w *Storage) Appender(_ context.Context) storage.Appender
- func (w *Storage) Close() error
- func (w *Storage) Directory() string
- func (w *Storage) SetNotifier(n wlog.WriteNotified)
- func (*Storage) StartTime() (int64, error)
- func (w *Storage) Truncate(mint int64) error
- func (w *Storage) WriteStalenessMarkers(remoteTsFunc func() int64) error
Constants ¶
This section is empty.
Variables ¶
var ErrWALClosed = fmt.Errorf("WAL storage closed")
ErrWALClosed is an error returned when a WAL operation can't run because the storage has already been closed.
Functions ¶
func SubDirectory ¶
SubDirectory returns the subdirectory within a Storage directory used for the Prometheus WAL.
Types ¶
type Storage ¶
type Storage struct { // Embed Queryable/ChunkQueryable for compatibility, but don't actually implement it. storage.Queryable storage.ChunkQueryable // contains filtered or unexported fields }
Storage implements storage.Storage, and just writes to the WAL.
func NewStorage ¶
func NewStorage(logger log.Logger, registerer prometheus.Registerer, path string) (*Storage, error)
NewStorage makes a new Storage.
func (*Storage) SetNotifier ¶ added in v1.1.0
func (w *Storage) SetNotifier(n wlog.WriteNotified)
SetNotifier sets the notifier for the WAL storage. SetNotifier must only be called before data is written to the WAL.
func (*Storage) StartTime ¶
StartTime always returns 0, nil. It is implemented for compatibility with Prometheus, but is unused in the agent.
func (*Storage) Truncate ¶
Truncate removes all data from the WAL prior to the timestamp specified by mint.
func (*Storage) WriteStalenessMarkers ¶
WriteStalenessMarkers appends a staleness sample for all active series.