Documentation ¶
Overview ¶
Package files provides a set type to track local/remote files with newness checks. We must do a certain amount of normalization in here. We will get fed paths with either native or wire-format separators and encodings depending on who calls us. We transform paths to wire-format (NFC and slashes) on the way to the database, and transform to native format (varying separator and encoding) on the way back out.
Index ¶
- func DropRepo(db *leveldb.DB, repo string)
- func ListRepos(db *leveldb.DB) []string
- type Set
- func (s *Set) Availability(file string) []protocol.NodeID
- func (s *Set) Get(node protocol.NodeID, file string) protocol.FileInfo
- func (s *Set) GetGlobal(file string) protocol.FileInfo
- func (s *Set) LocalVersion(node protocol.NodeID) uint64
- func (s *Set) Replace(node protocol.NodeID, fs []protocol.FileInfo)
- func (s *Set) ReplaceWithDelete(node protocol.NodeID, fs []protocol.FileInfo)
- func (s *Set) Update(node protocol.NodeID, fs []protocol.FileInfo)
- func (s *Set) WithGlobal(fn fileIterator)
- func (s *Set) WithGlobalTruncated(fn fileIterator)
- func (s *Set) WithHave(node protocol.NodeID, fn fileIterator)
- func (s *Set) WithHaveTruncated(node protocol.NodeID, fn fileIterator)
- func (s *Set) WithNeed(node protocol.NodeID, fn fileIterator)
- func (s *Set) WithNeedTruncated(node protocol.NodeID, fn fileIterator)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
func (*Set) Availability ¶ added in v0.7.0
func (*Set) ReplaceWithDelete ¶ added in v0.7.0
func (*Set) WithGlobal ¶ added in v0.9.0
func (s *Set) WithGlobal(fn fileIterator)
func (*Set) WithGlobalTruncated ¶ added in v0.9.3
func (s *Set) WithGlobalTruncated(fn fileIterator)
func (*Set) WithHaveTruncated ¶ added in v0.9.3
func (*Set) WithNeedTruncated ¶ added in v0.9.3
Click to show internal directories.
Click to hide internal directories.