storage

package
v0.0.0-...-fa82db8 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package storage defines the persistence interface used by the API layer.

The interface decouples API handlers from the backing store; an in-memory implementation lives under storage/memory. Persistent encrypted backends can be added behind the same interface without touching handler code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage interface {
	CreateQueue(ctx context.Context, keys queue.OwnerKeys) (*queue.Queue, error)
	GetQueue(ctx context.Context, id string) (*queue.Queue, error)
	PutMessage(ctx context.Context, queueID string, blob []byte) (*queue.Message, error)
	ListMessages(ctx context.Context, queueID string, limit int) (msgs []*queue.Message, hasMore bool, err error)
	DeleteMessage(ctx context.Context, queueID, messageID string) error
}

Storage is implemented by any backing store for queues and messages.

All methods are expected to be safe for concurrent use.

Directories

Path Synopsis
Package cleanup runs periodic deletion of expired queues from a Cleaner.
Package cleanup runs periodic deletion of expired queues from a Cleaner.
Package memory is an in-memory implementation of storage.Storage.
Package memory is an in-memory implementation of storage.Storage.
Package snapshot runs periodic online backups of a Snapshotter to a destination directory.
Package snapshot runs periodic online backups of a Snapshotter to a destination directory.
Package sqlite implements storage.Storage on top of a SQLCipher-encrypted SQLite database.
Package sqlite implements storage.Storage on top of a SQLCipher-encrypted SQLite database.

Jump to

Keyboard shortcuts

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