mailboat

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2019 License: MIT Imports: 4 Imported by: 0

README

Mailboat: a verified mail server

Build Status

Mailboat is a qmail-like mail server with a proof in Perennial. The proof shows that delivering, reading, and deleting mail are atomic with respect to other threads and crashes, and that operations are durable as soon as they return.

Benchmarking

Run ./scripts/run-mailboat.sh to run a mixed-workload benchmark, which is output from the test TestMixedLoad.

Documentation

Index

Constants

View Source
const NumUsers uint64 = 100
View Source
const SpoolDir = "spool"

Variables

This section is empty.

Functions

func Delete

func Delete(user uint64, msgID string)

Delete deletes a message for the current user. Requires the per-user lock, acquired with pickup.

func Deliver

func Deliver(user uint64, msg []byte)

Deliver stores a new message. Does not require holding the per-user pickup/delete lock.

func GetUserDir

func GetUserDir(user uint64) string

func Lock

func Lock(user uint64)

Lock acquires the lock for the current user

func Open

func Open()

func Recover

func Recover()

func Unlock

func Unlock(user uint64)

Unlock releases the lock for the current user.

Types

type Message

type Message struct {
	Id       string
	Contents string
}

func Pickup

func Pickup(user uint64) []Message

Pickup reads all stored messages and acquires a per-user lock.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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