Documentation
¶
Overview ¶
Package cache stores verified remote documents independently of SQLite.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalid = errors.New("invalid_remote_document_cache_request") ErrIntegrity = errors.New("remote_document_cache_integrity_failed") )
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func New ¶
New requires an already prepared private directory. Names come exclusively from validated content hashes, never remote paths or display names.
func (*Cache) Read ¶
func (cache *Cache) Read( ctx context.Context, reference jobcontract.ReportReference, fetch func(context.Context, io.ReadWriteSeeker) error, ) ([]byte, error)
Read resumes a private partial file and returns bytes only after validation, file sync and atomic durable publication. Existing complete files are checked without calling fetch. Errors preserve partials and never reset corrupt data.
Click to show internal directories.
Click to hide internal directories.