Documentation
¶
Overview ¶
Package sync provides a thin Go wrapper around the Mutagen CLI for creating, listing, and terminating file sync sessions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSession ¶
func CreateSession(name, src, dest, container, containerRuntime string, extraIgnores []string) error
CreateSession creates a Mutagen sync session between a host path and a container destination. The session is labeled managed-by=devx and named devx-sync-<name> for idempotent management.
If a session with the same name already exists, it is terminated first.
func DefaultIgnores ¶
func DefaultIgnores() []string
DefaultIgnores returns the set of patterns that every devx sync session excludes by default. These prevent catastrophic performance degradation from syncing millions of transient build/runtime files.
func EnsureDaemon ¶
func EnsureDaemon() error
EnsureDaemon starts the Mutagen daemon if it is not already running.
func IsInstalled ¶
func IsInstalled() bool
IsInstalled returns true if the mutagen binary is available on PATH.
func TerminateAll ¶
func TerminateAll() error
TerminateAll terminates all devx-managed Mutagen sync sessions.
func TerminateSession ¶
TerminateSession terminates a devx-managed Mutagen sync session by name.
Types ¶
type Session ¶
type Session struct {
Name string `json:"name"`
Source string `json:"source"`
Dest string `json:"dest"`
Container string `json:"container"`
Status string `json:"status"`
}
Session represents an active Mutagen sync session managed by devx.
func ListSessions ¶
ListSessions returns all active devx-managed Mutagen sync sessions.