spool

package
v0.0.0-...-9e52cca Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: GPL-3.0, AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package spool defines the Katzenpost server user message spool abstract interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Spool

type Spool interface {
	// StoreMessage stores a message in the user's spool.
	StoreMessage(u, msg []byte) error

	// StoreSURBReply stores a SURBReply in the user's spool.
	StoreSURBReply(u []byte, id *[constants.SURBIDLength]byte, msg []byte) error

	// Get optionally deletes the first entry in a user's spool, and returns
	// the (new) first entry.  Both messages and SURBReplies may be returned.
	Get(u []byte, advance bool) (msg, surbID []byte, remaining int, err error)

	// Remove removes the spool identified by the username from the database.
	Remove(u []byte) error

	// Vacuum removes the spools that do not correspond to valid users in the
	// provided UserDB.
	Vacuum(udb userdb.UserDB) error

	// Close closes the Spool instance.
	Close()
}

Spool is the interface provided by all user messgage spool implementations.

Directories

Path Synopsis
Package boltspool implements the Katzenpost server user message spool with a simple boltdb based backend.
Package boltspool implements the Katzenpost server user message spool with a simple boltdb based backend.

Jump to

Keyboard shortcuts

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