Documentation ¶
Overview ¶
Package sqlite implements a SQLite storage backend for the message queue.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageStorage ¶
type MessageStorage struct {
// contains filtered or unexported fields
}
MessageStorage is the SQLite storage backend for the message queue.
func NewMessageStorage ¶
func NewMessageStorage(ctx context.Context, cfg *StorageConfig, logger *slog.Logger) (*MessageStorage, error)
NewMessageStorage creates a new SQLite storage backend for the message queue.
func (*MessageStorage) Close ¶
func (s *MessageStorage) Close() error
func (*MessageStorage) RetrieveMessages ¶
func (*MessageStorage) StoreMessage ¶
func (s *MessageStorage) StoreMessage(ctx context.Context, msg *twismsproto.Message) error
type StorageConfig ¶
type StorageConfig struct { // Path is the path to/URI for the SQLite database file. Path string `json:"path"` // MaxAge is the maximum age of messages to keep in the database. MaxAge cfgutil.Duration `json:"max_age"` }
StorageConfig is the configuration for the "sqlite" storage backend.
Click to show internal directories.
Click to hide internal directories.