Documentation
¶
Overview ¶
Package spool stores unacked frames on disk until the server acks them.
Vendored from bot-agent internal/agent/spool (Apache-2.0, see ../NOTICE). DD changes: ids are worker protocol ids (workerproto.ValidID) instead of UUIDs; a full spool refuses the new frame (ErrFull) instead of dropping the oldest one, because the worker protocol must never lose an unacked frame; age is no longer enforced on Put or List but by DropOlderThan, which the worker calls only for jobs that already ended (protocol v1 §6.1); Bytes reports the directory's size for the worker-wide cap.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrFull = errors.New("spool full")
ErrFull is returned by Put when the frame does not fit under the cap.
Functions ¶
func FrameBytes ¶
FrameBytes is a small helper for tests that want a stable body.
Types ¶
type Spool ¶
type Spool struct {
// contains filtered or unexported fields
}
Spool is the $STATE_DIR/spool directory.
func OpenLimited ¶
OpenLimited is Open with an explicit cap.
func (*Spool) DropOlderThan ¶
DropOlderThan removes entries queued more than maxAge before now.