server: Index | Files | Directories

package spool

import ""

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


Package Files


type Spool Uses

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.

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


boltspoolPackage boltspool implements the Katzenpost server user message spool with a simple boltdb based backend.

Package spool imports 2 packages (graph) and is imported by 4 packages. Updated 2019-07-26. Refresh now. Tools for package owners.