Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EntryStore ¶
type EntryStore interface {
Len() int
Get(index int) log.Entry
GetRange(start, end int) []log.Entry
}
EntryStore is the interface for accessing log entries.
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
MemoryStore is a simple in-memory implementation of EntryStore.
func NewMemoryStore ¶
func NewMemoryStore(format log.Format) *MemoryStore
NewMemoryStore creates a new in-memory store with the given format.
func (*MemoryStore) Append ¶
func (m *MemoryStore) Append(entry log.Entry)
Append adds a pre-parsed entry to the store.
func (*MemoryStore) AppendRaw ¶
func (m *MemoryStore) AppendRaw(line string) log.Entry
AppendRaw parses a raw line and appends it to the store.
func (*MemoryStore) Len ¶
func (m *MemoryStore) Len() int
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store provides disk-backed access to log entries with an LRU cache.
func New ¶
New creates a new disk-backed store from a file. It scans the file to build the line offset index.
func (*Store) Get ¶
Get retrieves the entry at the given index. Uses cache if available, otherwise reads from disk.
Click to show internal directories.
Click to hide internal directories.