Remove explicit key handling

This commit is contained in:
Alexander Neumann
2014-12-21 18:10:19 +01:00
parent cc147c002e
commit ef41a77aff
14 changed files with 113 additions and 144 deletions
+4 -6
View File
@@ -22,9 +22,8 @@ const (
)
type Archiver struct {
s Server
key *Key
ch *ContentHandler
s Server
ch *ContentHandler
bl *BlobList // blobs used for the current snapshot
parentBl *BlobList // blobs from the parent snapshot
@@ -58,11 +57,10 @@ func (s *Stats) Add(other Stats) {
s.Other += other.Other
}
func NewArchiver(s Server, key *Key) (*Archiver, error) {
func NewArchiver(s Server) (*Archiver, error) {
var err error
arch := &Archiver{
s: s,
key: key,
fileToken: make(chan struct{}, maxConcurrentFiles),
blobToken: make(chan struct{}, maxConcurrentBlobs),
}
@@ -82,7 +80,7 @@ func NewArchiver(s Server, key *Key) (*Archiver, error) {
arch.Filter = func(string, os.FileInfo) bool { return true }
arch.bl = NewBlobList()
arch.ch, err = NewContentHandler(s, key)
arch.ch, err = NewContentHandler(s)
if err != nil {
return nil, err
}