Quellcode durchsuchen

Merge pull request #139 from tuna/support-non-linux-platforms

Mock btrfs hook in non linux platforms like darwin
Yuxiang Zhang vor 5 Jahren
Ursprung
Commit
2a8fa5636e
2 geänderte Dateien mit 32 neuen und 0 gelöschten Zeilen
  1. 2 0
      worker/btrfs_snapshot_hook.go
  2. 30 0
      worker/btrfs_snapshot_hook_nolinux.go

+ 2 - 0
worker/btrfs_snapshot_hook.go

@@ -1,3 +1,5 @@
+// +build linux
+
 package worker
 
 import (

+ 30 - 0
worker/btrfs_snapshot_hook_nolinux.go

@@ -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
+}