Introduce type Server

This commit is contained in:
Alexander Neumann committed 2014-12-21 17:37:29 +01:00
1 parent 661c1e9aa1
commit cc147c002e
15 files changed
+206 -106

No files matched your search

+4 -4
View File
@@ -22,7 +22,7 @@ const (
)
type Archiver struct {
be backend.Server
s Server
key *Key
ch *ContentHandler
@@ -58,10 +58,10 @@ func (s *Stats) Add(other Stats) {
s.Other += other.Other
}
func NewArchiver(be backend.Server, key *Key) (*Archiver, error) {
func NewArchiver(s Server, key *Key) (*Archiver, error) {
var err error
arch := &Archiver{
be: be,
s: s,
key: key,
fileToken: make(chan struct{}, maxConcurrentFiles),
blobToken: make(chan struct{}, maxConcurrentBlobs),
@@ -82,7 +82,7 @@ func NewArchiver(be backend.Server, key *Key) (*Archiver, error) {
arch.Filter = func(string, os.FileInfo) bool { return true }
arch.bl = NewBlobList()
arch.ch, err = NewContentHandler(be, key)
arch.ch, err = NewContentHandler(s, key)
if err != nil {
return nil, err
}