Documentation ¶
Overview ¶
Package state contains code for saving state between comeback runs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ScoreMap ¶
type ScoreMap interface { // Set a list of scores for a particular key. Set(key ScoreMapKey, scores []blob.Score) // Get the list of scores previously set for a key, or nil if no list has // been set. Get(key ScoreMapKey) (scores []blob.Score) }
A map from stat info for a file to a set of scores that represented that file's contents at the time the stat info was collected. (This of course is not atomic, so it's more like "around the time that the stat info was collected".)
All methods are safe for concurrent calling.
type ScoreMapKey ¶
type ScoreMapKey struct { Path string Permissions os.FileMode Uid sys.UserId Gid sys.GroupId MTime time.Time Inode uint64 Size uint64 }
Contains fields used by git for a similar purpose according to racy-git.txt.
type State ¶
type State struct { // The set of scores that are known to already exist in the blob store, in // hex form. It is unnecessary to again store any blob whose score is in this // set. ExistingScores util.StringSet // The time at which ExistingScores was last updated from the authoritative // source. RelistTime time.Time // A map from file system info to the scores that were seen for a given file // last time. These scores may have been written to the blob store, but not // flushed. ScoresForFiles ScoreMap }
State that should be saved between runs of the program.
Click to show internal directories.
Click to hide internal directories.