Documentation
¶
Overview ¶
Package spool owns the directory where upload handlers stage request bodies, so a crash cannot leave unbounded orphan files and one upload cannot fill the disk.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrQuota = errors.New("spool: quota exceeded")
ErrQuota is returned by Create when the spool already holds its byte quota.
Functions ¶
func Dir ¶
func Dir() string
Dir returns the spool directory, created on demand. Only files with our prefix are ever counted or swept, so sharing the OS temp dir is safe.
func SetMaxAge ¶
func SetMaxAge(secs int64)
SetMaxAge sets the orphan age in seconds at runtime; 0 reverts to env.
Types ¶
Click to show internal directories.
Click to hide internal directories.