Documentation ¶
Overview ¶
Package writeback keeps track of the files which need to be written back to storage
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WriteBack ¶
type WriteBack struct {
// contains filtered or unexported fields
}
WriteBack keeps track of the items which need to be written back to the disk at some point
func (*WriteBack) Add ¶
Add adds an item to the writeback queue or resets its timer if it is already there.
If id is 0 then a new item will always be created and the new Handle will be returned.
Use SetID to create Handles in advance of calling Add.
If modified is false then it it doesn't cancel a pending upload if there is one as there is no need.
func (*WriteBack) Remove ¶
Remove should be called when a file should be removed from the writeback queue. This cancels a writeback if there is one and doesn't return the item to the queue.
func (*WriteBack) Rename ¶
Rename should be called when a file might be uploading and it gains a new name. This will cancel the upload and put it back in the queue.