//go:build !linux package apply import ( "context" "errors" "github.com/novox/mesh-host/internal/declaration" "github.com/novox/mesh-host/internal/store" ) // The node-engine runs on Linux: a folder is kept only by descriptor and through the kernel's ACL attributes, // which this system has not. Everything refuses, saying so, and changes nothing. var errNoKeeping = errors.New("a shared folder is kept only by descriptor, which this system cannot; nothing was changed") // FolderFacts is what the engine reads of a folder before keeping it. type FolderFacts struct { UID, GID uint32 Empty bool } func readFolder(string) (FolderFacts, error) { return FolderFacts{}, errNoKeeping } func keepTop(string, map[uint32]bool) (bool, error) { return false, errNoKeeping } func CreatePath(string) (int, error) { return 0, errNoKeeping } func ReconcileKept(context.Context) []string { return nil } func JudgeKept(string, []store.KeptUser, WalkLimits) (WalkCounts, error) { return WalkCounts{}, errNoKeeping } // KeptLook is what one look found of a kept folder. type KeptLook struct { Short []string Busy bool Sweep store.KeptSweep Repaired, Unrepaired int Failed string } func LookKept(string, []store.KeptUser, WalkLimits) KeptLook { return KeptLook{Failed: errNoKeeping.Error()} } func TakeFolder(context.Context, *declaration.Declaration, string, string, string, string, Runner) (<-chan struct{}, string, error) { return nil, "", errNoKeeping } // Watcher watches nothing where a folder is not kept. type Watcher struct{} func NewWatcher() (*Watcher, error) { return nil, errNoKeeping } func (*Watcher) Set(map[string][]store.KeptUser) {} func (*Watcher) Run(context.Context) {}