runtimefs

package
v0.0.13-rc.2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package runtimefs provides ordinary Runtime state files and process locks. It does not restrict the launching user or implement a sandbox.

Index

Constants

This section is empty.

Variables

View Source
var ErrLocked = errors.New("directory is locked by another process")

ErrLocked reports that another process holds the directory lock.

View Source
var ErrUnsafe = errors.New("Runtime state path unavailable or invalid")

Functions

func EnsurePrivateDir

func EnsurePrivateDir(path string) error

EnsurePrivateDir creates state directories with normal account permissions.

func LockDirectory

func LockDirectory(root *os.Root) (func(), error)

func MkdirPrivate

func MkdirPrivate(root *os.Root, name string) error

func OpenPrivate

func OpenPrivate(root *os.Root, name string, flags int) (*os.File, error)

OpenPrivate uses default credential-file permissions when creating a file. Existing files retain the launching user's normal filesystem permissions.

func PrivateDirectory

func PrivateDirectory(root *os.Root) error

PrivateDirectory checks the storage type, not the account's access policy.

func ReadPrivate

func ReadPrivate(root *os.Root, name string, limit int64) ([]byte, error)

ReadPrivate reads a bounded regular state file.

func ReadPrivatePath

func ReadPrivatePath(path string, limit int64) ([]byte, error)

ReadPrivatePath is for startup credentials outside an already-open root.

func SyncDirectory

func SyncDirectory(root *os.Root) error

func ValidateLocalPath

func ValidateLocalPath(path string) error

func WritePrivateAtomic

func WritePrivateAtomic(root *os.Root, name string, data []byte) error

WritePrivateAtomic writes a fresh state file before replacing the name. An old permissive target is replaced, never opened or repaired in place.

Types

This section is empty.

Jump to

Keyboard shortcuts

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