Skip to content

Commit

Permalink
Merge pull request #139 from tuna/support-non-linux-platforms
Browse files Browse the repository at this point in the history
Mock btrfs hook in non linux platforms like darwin
  • Loading branch information
z4yx committed Sep 17, 2020
2 parents 94b9b20 + 5a9c6b9 commit 2a8fa56
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
2 changes: 2 additions & 0 deletions worker/btrfs_snapshot_hook.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build linux

package worker

import (
Expand Down
30 changes: 30 additions & 0 deletions worker/btrfs_snapshot_hook_nolinux.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// +build !linux

package worker

type btrfsSnapshotHook struct {
}

func newBtrfsSnapshotHook(provider mirrorProvider, snapshotPath string, mirror mirrorConfig) *btrfsSnapshotHook {
return &btrfsSnapshotHook{}
}

func (h *btrfsSnapshotHook) postExec() error {
return nil
}

func (h *btrfsSnapshotHook) postFail() error {
return nil
}

func (h *btrfsSnapshotHook) postSuccess() error {
return nil
}

func (h *btrfsSnapshotHook) preExec() error {
return nil
}

func (h *btrfsSnapshotHook) preJob() error {
return nil
}

0 comments on commit 2a8fa56

Please sign in to comment.