forked from TrueCloudLab/restic
Unexport NewPackerManager
This commit is contained in:
parent
1e1368eea3
commit
18c3024171
3 changed files with 5 additions and 5 deletions
|
@ -32,9 +32,9 @@ const minPackSize = 4 * 1024 * 1024
|
||||||
const maxPackSize = 16 * 1024 * 1024
|
const maxPackSize = 16 * 1024 * 1024
|
||||||
const maxPackers = 200
|
const maxPackers = 200
|
||||||
|
|
||||||
// NewPackerManager returns an new packer manager which writes temporary files
|
// newPackerManager returns an new packer manager which writes temporary files
|
||||||
// to a temporary directory
|
// to a temporary directory
|
||||||
func NewPackerManager(be Saver, key *crypto.Key) *packerManager {
|
func newPackerManager(be Saver, key *crypto.Key) *packerManager {
|
||||||
return &packerManager{
|
return &packerManager{
|
||||||
be: be,
|
be: be,
|
||||||
key: key,
|
key: key,
|
||||||
|
|
|
@ -145,7 +145,7 @@ func TestPackerManager(t *testing.T) {
|
||||||
rnd := newRandReader(rand.NewSource(23))
|
rnd := newRandReader(rand.NewSource(23))
|
||||||
|
|
||||||
be := mem.New()
|
be := mem.New()
|
||||||
pm := NewPackerManager(be, crypto.NewRandomKey())
|
pm := newPackerManager(be, crypto.NewRandomKey())
|
||||||
|
|
||||||
blobBuf := make([]byte, maxBlobSize)
|
blobBuf := make([]byte, maxBlobSize)
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ func BenchmarkPackerManager(t *testing.B) {
|
||||||
rnd := newRandReader(rand.NewSource(23))
|
rnd := newRandReader(rand.NewSource(23))
|
||||||
|
|
||||||
be := &fakeBackend{}
|
be := &fakeBackend{}
|
||||||
pm := NewPackerManager(be, crypto.NewRandomKey())
|
pm := newPackerManager(be, crypto.NewRandomKey())
|
||||||
blobBuf := make([]byte, maxBlobSize)
|
blobBuf := make([]byte, maxBlobSize)
|
||||||
|
|
||||||
t.ResetTimer()
|
t.ResetTimer()
|
||||||
|
|
|
@ -31,7 +31,7 @@ func New(be backend.Backend) *Repository {
|
||||||
repo := &Repository{
|
repo := &Repository{
|
||||||
be: be,
|
be: be,
|
||||||
idx: NewMasterIndex(),
|
idx: NewMasterIndex(),
|
||||||
packerManager: NewPackerManager(be, nil),
|
packerManager: newPackerManager(be, nil),
|
||||||
}
|
}
|
||||||
|
|
||||||
return repo
|
return repo
|
||||||
|
|
Loading…
Reference in a new issue