Documentation
¶
Index ¶
- Constants
- func CommitDir(root, final string, populate func(stage string) error) (err error)
- func EnsureDirWithin(root, dir string) (string, error)
- func EventID(now time.Time) string
- func ResolveSection(root, section string) (string, error)
- func Slug(value string) string
- func SyncDir(path string) error
- func WithSagaLock(root string, timeout time.Duration, operation func() error) error
- func WriteFile(path string, data []byte, perm fs.FileMode, exclusive bool) (err error)
- func WriteJSON(path string, value any, exclusive bool) error
Constants ¶
View Source
const DefaultLockTimeout = 2 * time.Second
Variables ¶
This section is empty.
Functions ¶
func CommitDir ¶
CommitDir builds a complete entity in a hidden same-parent staging directory and publishes it with one rename. Failed builds never expose the final entity name and temporary state is removed on every return path.
func EnsureDirWithin ¶
EnsureDirWithin validates every existing path component before creating anything, then creates missing components one at a time. Symlinks are never accepted, including symlinked reserved metadata directories.
func ResolveSection ¶
func WithSagaLock ¶
WithSagaLock serializes supported writers across processes. Lock acquisition is bounded so a busy saga produces a clear error instead of hanging.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.