storages

package
v0.0.0-...-70d6eb3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2025 License: LGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInMemory

func NewInMemory(size int) notilog.Storage

func NewSqliteStorage

func NewSqliteStorage(ctx context.Context, logger logz.Logger, dbPath string) (notilog.Storage, error)

Types

type InMemoryStorage

type InMemoryStorage struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*InMemoryStorage) Append

func (*InMemoryStorage) Prune

func (*InMemoryStorage) Query

func (s *InMemoryStorage) Query(_ context.Context, criteria ...notilog.Criterion) (res []*notilog.Notification, err error)

type SqliteStorage

type SqliteStorage struct {
	// contains filtered or unexported fields
}

func (*SqliteStorage) Append

func (s *SqliteStorage) Append(ctx context.Context, notification *notilog.Notification) error

func (*SqliteStorage) Prune

func (s *SqliteStorage) Prune(ctx context.Context) error

func (*SqliteStorage) Query

func (s *SqliteStorage) Query(ctx context.Context, criteria ...notilog.Criterion) ([]*notilog.Notification, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL