Eric Bower
·
2026-05-31
1package rsyncsender
2
3import (
4 "io"
5 "log/slog"
6
7 "github.com/picosh/pico/pkg/rsync-receiver/rsyncopts"
8 "github.com/picosh/pico/pkg/rsync-receiver/rsyncwire"
9 "github.com/picosh/pico/pkg/rsync-receiver/utils"
10)
11
12type Osenv struct {
13 Stdin io.Reader
14 Stdout io.Writer
15 Stderr io.Writer
16}
17
18// TransferOpts is a subset of Opts which is required for implementing a receiver.
19type TransferOpts struct {
20 Verbose bool
21 DryRun bool
22
23 DeleteMode bool
24 PreserveGid bool
25 PreserveUid bool
26 PreserveLinks bool
27 PreservePerms bool
28 PreserveDevices bool
29 PreserveSpecials bool
30 PreserveTimes bool
31 PreserveHardlinks bool
32}
33
34type Transfer struct {
35 // config
36 // Opts *Opts
37 Opts *rsyncopts.Options
38
39 // state
40 Conn *rsyncwire.Conn
41 Seed int32
42 lastMatch int64
43
44 Files utils.FS
45
46 Logger *slog.Logger
47}
48
49//func (rt *Transfer) listOnly() bool { return rt.Dest == "" }