fsq

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BoxNew = "new"
	BoxCur = "cur"
)

Variables

This section is empty.

Functions

func AgentAcksReceived

func AgentAcksReceived(root, agent string) string

func AgentAcksSent

func AgentAcksSent(root, agent string) string

func AgentBase

func AgentBase(root, agent string) string

func AgentInboxCur

func AgentInboxCur(root, agent string) string

func AgentInboxNew

func AgentInboxNew(root, agent string) string

func AgentInboxTmp

func AgentInboxTmp(root, agent string) string

func AgentOutboxSent

func AgentOutboxSent(root, agent string) string

func DeliverToInbox

func DeliverToInbox(root, agent, filename string, data []byte) (string, error)

DeliverToInbox writes a message using Maildir semantics (tmp -> new). It returns the final path in inbox/new.

func DeliverToInboxes added in v0.2.0

func DeliverToInboxes(root string, recipients []string, filename string, data []byte) (map[string]string, error)

DeliverToInboxes writes a message to multiple inboxes. On failure, it attempts to roll back any prior deliveries.

func EnsureAgentDirs

func EnsureAgentDirs(root, agent string) error

func EnsureRootDirs

func EnsureRootDirs(root string) error

func FindMessage

func FindMessage(root, agent, filename string) (string, string, error)

func FindTmpFilesOlderThan

func FindTmpFilesOlderThan(root string, cutoff time.Time) ([]string, error)

func ListAgents

func ListAgents(root string) ([]string, error)

func MoveNewToCur

func MoveNewToCur(root, agent, filename string) error

func SyncDir

func SyncDir(dir string) error

SyncDir fsyncs a directory to ensure directory entries are durable.

func WriteFileAtomic

func WriteFileAtomic(dir, filename string, data []byte, perm os.FileMode) (string, error)

WriteFileAtomic writes data to a temporary file in dir and renames it into place.

Types

This section is empty.

Jump to

Keyboard shortcuts

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