backup

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dir

func Dir() (string, error)

Dir returns the path to the backup directory.

func Exists

func Exists(port int) bool

Exists reports whether the backup file for the given port exists.

func Load

func Load(port int, dest any) error

Load reads the backup file for the given port. Returns a nil error if the file does not exist.

func Path

func Path(port int) (string, error)

Path returns the backup file path for the given port.

func Remove

func Remove(port int) error

Remove deletes the backup file for the given port. Returns nil if the file does not exist.

func Save

func Save(port int, data any) (retErr error)

Save atomically writes data to the backup file for the given port.

Types

This section is empty.

Jump to

Keyboard shortcuts

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