feat: implement new logic for local storage and exporters

This commit is contained in:
Patryk Hegenberg 2025-09-23 14:14:53 +02:00
parent 491eeaabd7
commit 366aac9edc
11 changed files with 1170 additions and 33 deletions

31
storage_interface.go Normal file
View file

@ -0,0 +1,31 @@
package main
import (
"context"
"time"
)
type StorageInterface interface {
Store(ctx context.Context, entry *LogEntry) error
StoreBatch(ctx context.Context, entries []LogEntry) error
Query(ctx context.Context, query StorageQuery) ([]LogEntry, error)
Close() error
}
type StorageQuery struct {
StartTime time.Time
EndTime time.Time
Service string
Tool string
LogLevel string
Type string
Limit int
Offset int
OrderBy string
OrderDesc bool
}
type ExporterInterface interface {
Export(ctx context.Context, entries []LogEntry) error
HealthCheck(ctx context.Context) error
}