refactor: Inject mtio package to allow for remote implementation
This commit is contained in:
@@ -21,6 +21,7 @@ import (
|
||||
"github.com/pojntfx/stfs/pkg/cache"
|
||||
"github.com/pojntfx/stfs/pkg/config"
|
||||
"github.com/pojntfx/stfs/pkg/keys"
|
||||
"github.com/pojntfx/stfs/pkg/mtio"
|
||||
"github.com/pojntfx/stfs/pkg/operations"
|
||||
"github.com/pojntfx/stfs/pkg/persisters"
|
||||
"github.com/pojntfx/stfs/pkg/tape"
|
||||
@@ -339,8 +340,10 @@ func createSTFS(
|
||||
|
||||
initialize bool,
|
||||
) (afero.Fs, error) {
|
||||
mt := mtio.MagneticTapeIO{}
|
||||
tm := tape.NewTapeManager(
|
||||
drive,
|
||||
mt,
|
||||
recordSize,
|
||||
false,
|
||||
)
|
||||
@@ -369,6 +372,8 @@ func createSTFS(
|
||||
|
||||
GetReader: tm.GetReader,
|
||||
CloseReader: tm.Close,
|
||||
|
||||
MagneticTapeIO: mt,
|
||||
}
|
||||
readCryptoConfig := config.CryptoConfig{
|
||||
Recipient: signatureRecipient,
|
||||
|
||||
Reference in New Issue
Block a user