Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*SQLiteWriter)
Option configures the writer.
func WithLogger ¶
WithLogger injects a structured logger into the writer.
func WithMetrics ¶
func WithMetrics(metrics *observability.Metrics) Option
WithMetrics attaches metrics instrumentation.
type SQLiteConfig ¶
SQLiteConfig holds configuration values for the SQLite writer.
type SQLiteWriter ¶
type SQLiteWriter struct {
// contains filtered or unexported fields
}
SQLiteWriter persists packets into a SQLite database.
func NewSQLiteWriter ¶
func NewSQLiteWriter(cfg SQLiteConfig, opts ...Option) (*SQLiteWriter, error)
NewSQLiteWriter constructs a writer with the provided configuration.
func (*SQLiteWriter) Start ¶
func (w *SQLiteWriter) Start(ctx context.Context) error
Start opens the database, runs migrations, and begins processing the queue.
func (*SQLiteWriter) Stop ¶
func (w *SQLiteWriter) Stop() error
Stop finalises the writer and closes the database connection.
type StartStopper ¶
StartStopper represents writers that need explicit lifecycle management.
Click to show internal directories.
Click to hide internal directories.