Documentation
¶
Overview ¶
Package rsynccmd provides a command-like interface to gokrazy/rsync, which contains a native Go rsync implementation that supports sending and receiving files as client or server, compatible with the original tridge rsync (from the samba project) or openrsync (used on OpenBSD and macOS 15+).
This interface allows you to replace calls to an external rsync program, like:
rsync -a rsync://share01/dataset /tmp/dataset
…with calls into Go code running in the same process (no dependency on an external rsync program!):
cmd := rsynccmd.Command("rsync", "-a", "rsync://share01/dataset", "/tmp/dataset") cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr if _, err := cmd.Run(context.Background()); err != nil { return fmt.Errorf("%v: %v", cmd.Args, err) }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cmd ¶
Cmd represents an rsync invocation being prepared or run.
type Result ¶
type Result struct {
Stats *rsyncstats.TransferStats
}
Result contains information about the transfer.
Click to show internal directories.
Click to hide internal directories.