files

package
v0.10.0-beta1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2014 License: MIT Imports: 15 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func DropRepo

func DropRepo(db *leveldb.DB, repo string)

DropRepo clears out all information related to the given repo from the database.

func ListRepos

func ListRepos(db *leveldb.DB) []string

ListRepos returns the repository IDs seen in the database.

Types

type Set

type Set struct {
	// contains filtered or unexported fields
}

func NewSet

func NewSet(repo string, db *leveldb.DB) *Set

func (*Set) Availability

func (s *Set) Availability(file string) []protocol.NodeID

func (*Set) Get

func (s *Set) Get(node protocol.NodeID, file string) protocol.FileInfo

func (*Set) GetGlobal

func (s *Set) GetGlobal(file string) protocol.FileInfo

func (*Set) LocalVersion

func (s *Set) LocalVersion(node protocol.NodeID) uint64

func (*Set) Replace

func (s *Set) Replace(node protocol.NodeID, fs []protocol.FileInfo)

func (*Set) ReplaceWithDelete

func (s *Set) ReplaceWithDelete(node protocol.NodeID, fs []protocol.FileInfo)

func (*Set) Update

func (s *Set) Update(node protocol.NodeID, fs []protocol.FileInfo)

func (*Set) WithGlobal

func (s *Set) WithGlobal(fn fileIterator)

func (*Set) WithGlobalTruncated

func (s *Set) WithGlobalTruncated(fn fileIterator)

func (*Set) WithHave

func (s *Set) WithHave(node protocol.NodeID, fn fileIterator)

func (*Set) WithHaveTruncated

func (s *Set) WithHaveTruncated(node protocol.NodeID, fn fileIterator)

func (*Set) WithNeed

func (s *Set) WithNeed(node protocol.NodeID, fn fileIterator)

func (*Set) WithNeedTruncated

func (s *Set) WithNeedTruncated(node protocol.NodeID, fn fileIterator)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL