Skip to content

Commit

Permalink
Add OS interface (#404)
Browse files Browse the repository at this point in the history
  • Loading branch information
benbjohnson authored Sep 20, 2023
1 parent dd46004 commit a960f04
Show file tree
Hide file tree
Showing 6 changed files with 309 additions and 97 deletions.
3 changes: 3 additions & 0 deletions cmd/litefs/mount_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type MountCommand struct {

Config Config

OS litefs.OS
Store *litefs.Store
Leaser litefs.Leaser
FileSystem *fuse.FileSystem
Expand All @@ -50,6 +51,7 @@ func NewMountCommand() *MountCommand {
return &MountCommand{
execCh: make(chan error),
Config: NewConfig(),
OS: &internal.SystemOS{},
}
}

Expand Down Expand Up @@ -348,6 +350,7 @@ func (c *MountCommand) initConsul(ctx context.Context) (err error) {

func (c *MountCommand) initStore(ctx context.Context) error {
c.Store = litefs.NewStore(c.Config.Data.Dir, c.Config.Lease.Candidate)
c.Store.OS = c.OS
c.Store.StrictVerify = c.Config.StrictVerify
c.Store.Compress = c.Config.Data.Compress
c.Store.Retention = c.Config.Data.Retention
Expand Down
Loading

0 comments on commit a960f04

Please sign in to comment.