Files
syncthing-arm/internal/model/.model.go.swp
T

22 lines
16 KiB
Plaintext
Raw Normal View History

b0VIM 7.4!ZEU¶ì°Ílhostemb5-btrfs/data/Sync-Projects/golang-workspace/src/github.com/syncthing/syncthing/internal/model/model.go
3210#"! U
Ù ¥ u @    Ù Ñ j ÿ
³
a
_
^
E
<
4
ê Î Í ° o m l X 7  ù×´œoYX¦Hê(ÂeÒ§ED2 öôó£SmU%ùâàshortID: id.Short(), id: id, progressEmitter: NewProgressEmitter(cfg), finder: db.NewBlockFinder(ldb, cfg), db: ldb, cfg: cfg, m := &Model{func NewModel(cfg *config.Wrapper, id protocol.DeviceID, deviceName, clientName, clientVersion string, ldb *leveldb.DB) *Model {// for file data without altering the local folder in any way.// where it sends index information to connected peers and responds to requests// NewModel creates and starts a new model. The model starts in read-only mode,) SymlinkWarning = stdsync.Once{}var (} started bool addedFolder bool pmut sync.RWMutex // protects protoConn and rawConn deviceVer map[protocol.DeviceID]string rawConn map[protocol.DeviceID]io.Closer protoConn map[protocol.DeviceID]protocol.Connection fmut sync.RWMutex // protects the above folderStatRefs map[string]*stats.FolderStatisticsReference // folder -> statsRef folderRunners map[string]service // folder -> puller or scanner folderIgnores map[string]*ignore.Matcher // folder -> matcher object deviceStatRefs map[protocol.DeviceID]*stats.DeviceStatisticsReference // deviceID -> statsRef deviceFolders map[protocol.DeviceID][]string // deviceID -> folders folderDevices map[string][]protocol.DeviceID // folder -> deviceIDs folderFiles map[string]*db.FileSet // folder -> files folderCfgs map[string]config.FolderConfiguration // folder -> cfg clientVersion string clientName string deviceName string shortID uint64 id protocol.DeviceID progressEmitter *ProgressEmitter finder *db.BlockFinder db *leveldb.DB cfg *config.Wrappertype Model struct {} getState() (folderState, time.Time, error) setError(err error) setState(state folderState) DelayScan(d time.Duration) BringToFront(string) Jobs() ([]string, []string) // In progress, Queued Stop() Serve()type service interface {) indexBatchSize = 1000 // Either way, don't include more files than this IndexPerBlockSize = 40 // Each BlockInfo is approximately this big indexPerFileSize = 250 // Each FileInfo is approximately this big, in bytes, excluding BlockInfos indexTargetSize = 250 * 1024 // Aim for making index messages no larger than 250 KiB (uncompressed)const (// How many files to send in each Index/IndexUpdate message.) "github.com/syndtr/goleveldb/leveldb" "github.com/syncthing/syncthing/internal/versioner" "github.com/syncthing/syncthing/internal/sync" "github.com/syncthing/syncthing/internal/symlinks" "github.com/syncthing/syncthing/internal/stats" "github.com/syncthing/syncthing/internal/scanner" "github.com/syncthing/syncthing/internal/osutil" "github.com/syncthing/syncthing/internal/ignore" "github.com/syncthing/syncthing/internal/events" "github.com/syncthing/syncthing/internal/db" "github.com/syncthing/syncthing/internal/config" "github.com/syncthing/protocol" "time" stdsync "sync" "strings" "runtime" "path/filepath" "os" "net" "io/ioutil" "io" "fmt" "errors" "encoding/json" "crypto/tls" "bufio"import (package model// You can obtain one at http://mozilla.org/MPL/2.0/.// License, v. 2.0. If a copy of the MPL was not distributed with this file,// This Source Code Form is subject to the terms of the Mozilla Public//// Copyright (C) 2014 The Syncthing Authors.adueuá× œ~}<øà߸¯ŽD
Õ
²
¨
{
x
w
T
0
ò ´ q M ,  ß ² ® Ž N ) î