├── .github └── workflows │ ├── release.yml │ └── tunasync.yml ├── .gitignore ├── .testpackages.txt ├── .umlrootfs └── Dockerfile ├── .vscode └── settings.json ├── LICENSE ├── Makefile ├── README.md ├── autocomplete ├── tunasynctl.bash └── tunasynctl.zsh ├── cmd ├── tunasync │ └── tunasync.go └── tunasynctl │ └── tunasynctl.go ├── docs ├── cgroup.md └── zh_CN │ ├── get_started.md │ ├── tips.md │ └── workers.conf ├── go.mod ├── go.sum ├── internal ├── logger.go ├── msg.go ├── status.go ├── status_test.go ├── status_web.go ├── status_web_test.go ├── util.go ├── util_test.go └── version.go ├── manager ├── common.go ├── config.go ├── config_test.go ├── db.go ├── db_badger.go ├── db_bolt.go ├── db_leveldb.go ├── db_redis.go ├── db_test.go ├── middleware.go ├── server.go └── server_test.go ├── package.json ├── systemd ├── tunasync-manager.service └── tunasync-worker.service ├── tests ├── bin │ ├── myrsync.sh │ └── myrsync2.sh ├── conda_repodata.json ├── httpClient.go ├── httpServer.go ├── manager.conf ├── manager.crt ├── manager.csr ├── manager.key ├── managerMain.go ├── mirrors │ ├── aosp.conf │ └── deb_fedora.conf ├── req.cnf ├── rootCA.crt ├── rootCA.key ├── rootCA.srl ├── worker.conf ├── worker.crt ├── worker.csr ├── worker.key └── workerMain.go └── worker ├── base_provider.go ├── btrfs_snapshot_hook.go ├── btrfs_snapshot_hook_nolinux.go ├── cgroup.go ├── cgroup_test.go ├── cmd_provider.go ├── common.go ├── config.go ├── config_diff.go ├── config_diff_test.go ├── config_test.go ├── context.go ├── context_test.go ├── docker.go ├── docker_test.go ├── exec_post_hook.go ├── exec_post_test.go ├── hooks.go ├── job.go ├── job_test.go ├── loglimit_hook.go ├── loglimit_test.go ├── provider.go ├── provider_test.go ├── rsync_provider.go ├── runner.go ├── schedule.go ├── schedule_test.go ├── two_stage_rsync_provider.go ├── worker.go ├── worker_test.go ├── zfs_hook.go └── zfs_hook_test.go /.github/workflows/release.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/.github/workflows/release.yml -------------------------------------------------------------------------------- /.github/workflows/tunasync.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/.github/workflows/tunasync.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/.gitignore -------------------------------------------------------------------------------- /.testpackages.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/.testpackages.txt -------------------------------------------------------------------------------- /.umlrootfs/Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/.umlrootfs/Dockerfile -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/.vscode/settings.json -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/LICENSE -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/Makefile -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/README.md -------------------------------------------------------------------------------- /autocomplete/tunasynctl.bash: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/autocomplete/tunasynctl.bash -------------------------------------------------------------------------------- /autocomplete/tunasynctl.zsh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/autocomplete/tunasynctl.zsh -------------------------------------------------------------------------------- /cmd/tunasync/tunasync.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/cmd/tunasync/tunasync.go -------------------------------------------------------------------------------- /cmd/tunasynctl/tunasynctl.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/cmd/tunasynctl/tunasynctl.go -------------------------------------------------------------------------------- /docs/cgroup.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/docs/cgroup.md -------------------------------------------------------------------------------- /docs/zh_CN/get_started.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/docs/zh_CN/get_started.md -------------------------------------------------------------------------------- /docs/zh_CN/tips.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/docs/zh_CN/tips.md -------------------------------------------------------------------------------- /docs/zh_CN/workers.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/docs/zh_CN/workers.conf -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/go.mod -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/go.sum -------------------------------------------------------------------------------- /internal/logger.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/internal/logger.go -------------------------------------------------------------------------------- /internal/msg.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/internal/msg.go -------------------------------------------------------------------------------- /internal/status.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/internal/status.go -------------------------------------------------------------------------------- /internal/status_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/internal/status_test.go -------------------------------------------------------------------------------- /internal/status_web.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/internal/status_web.go -------------------------------------------------------------------------------- /internal/status_web_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/internal/status_web_test.go -------------------------------------------------------------------------------- /internal/util.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/internal/util.go -------------------------------------------------------------------------------- /internal/util_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/internal/util_test.go -------------------------------------------------------------------------------- /internal/version.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/internal/version.go -------------------------------------------------------------------------------- /manager/common.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/manager/common.go -------------------------------------------------------------------------------- /manager/config.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/manager/config.go -------------------------------------------------------------------------------- /manager/config_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/manager/config_test.go -------------------------------------------------------------------------------- /manager/db.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/manager/db.go -------------------------------------------------------------------------------- /manager/db_badger.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/manager/db_badger.go -------------------------------------------------------------------------------- /manager/db_bolt.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/manager/db_bolt.go -------------------------------------------------------------------------------- /manager/db_leveldb.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/manager/db_leveldb.go -------------------------------------------------------------------------------- /manager/db_redis.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/manager/db_redis.go -------------------------------------------------------------------------------- /manager/db_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/manager/db_test.go -------------------------------------------------------------------------------- /manager/middleware.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/manager/middleware.go -------------------------------------------------------------------------------- /manager/server.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/manager/server.go -------------------------------------------------------------------------------- /manager/server_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/manager/server_test.go -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/package.json -------------------------------------------------------------------------------- /systemd/tunasync-manager.service: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/systemd/tunasync-manager.service -------------------------------------------------------------------------------- /systemd/tunasync-worker.service: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/systemd/tunasync-worker.service -------------------------------------------------------------------------------- /tests/bin/myrsync.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo $@ 3 | sleep 5 4 | -------------------------------------------------------------------------------- /tests/bin/myrsync2.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/tests/bin/myrsync2.sh -------------------------------------------------------------------------------- /tests/conda_repodata.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/tests/conda_repodata.json -------------------------------------------------------------------------------- /tests/httpClient.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/tests/httpClient.go -------------------------------------------------------------------------------- /tests/httpServer.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/tests/httpServer.go -------------------------------------------------------------------------------- /tests/manager.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/tests/manager.conf -------------------------------------------------------------------------------- /tests/manager.crt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/tests/manager.crt -------------------------------------------------------------------------------- /tests/manager.csr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/tests/manager.csr -------------------------------------------------------------------------------- /tests/manager.key: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/tests/manager.key -------------------------------------------------------------------------------- /tests/managerMain.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/tests/managerMain.go -------------------------------------------------------------------------------- /tests/mirrors/aosp.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/tests/mirrors/aosp.conf -------------------------------------------------------------------------------- /tests/mirrors/deb_fedora.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/tests/mirrors/deb_fedora.conf -------------------------------------------------------------------------------- /tests/req.cnf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/tests/req.cnf -------------------------------------------------------------------------------- /tests/rootCA.crt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/tests/rootCA.crt -------------------------------------------------------------------------------- /tests/rootCA.key: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/tests/rootCA.key -------------------------------------------------------------------------------- /tests/rootCA.srl: -------------------------------------------------------------------------------- 1 | DB01B233C4550DC3 2 | -------------------------------------------------------------------------------- /tests/worker.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/tests/worker.conf -------------------------------------------------------------------------------- /tests/worker.crt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/tests/worker.crt -------------------------------------------------------------------------------- /tests/worker.csr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/tests/worker.csr -------------------------------------------------------------------------------- /tests/worker.key: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/tests/worker.key -------------------------------------------------------------------------------- /tests/workerMain.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/tests/workerMain.go -------------------------------------------------------------------------------- /worker/base_provider.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/base_provider.go -------------------------------------------------------------------------------- /worker/btrfs_snapshot_hook.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/btrfs_snapshot_hook.go -------------------------------------------------------------------------------- /worker/btrfs_snapshot_hook_nolinux.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/btrfs_snapshot_hook_nolinux.go -------------------------------------------------------------------------------- /worker/cgroup.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/cgroup.go -------------------------------------------------------------------------------- /worker/cgroup_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/cgroup_test.go -------------------------------------------------------------------------------- /worker/cmd_provider.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/cmd_provider.go -------------------------------------------------------------------------------- /worker/common.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/common.go -------------------------------------------------------------------------------- /worker/config.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/config.go -------------------------------------------------------------------------------- /worker/config_diff.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/config_diff.go -------------------------------------------------------------------------------- /worker/config_diff_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/config_diff_test.go -------------------------------------------------------------------------------- /worker/config_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/config_test.go -------------------------------------------------------------------------------- /worker/context.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/context.go -------------------------------------------------------------------------------- /worker/context_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/context_test.go -------------------------------------------------------------------------------- /worker/docker.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/docker.go -------------------------------------------------------------------------------- /worker/docker_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/docker_test.go -------------------------------------------------------------------------------- /worker/exec_post_hook.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/exec_post_hook.go -------------------------------------------------------------------------------- /worker/exec_post_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/exec_post_test.go -------------------------------------------------------------------------------- /worker/hooks.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/hooks.go -------------------------------------------------------------------------------- /worker/job.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/job.go -------------------------------------------------------------------------------- /worker/job_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/job_test.go -------------------------------------------------------------------------------- /worker/loglimit_hook.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/loglimit_hook.go -------------------------------------------------------------------------------- /worker/loglimit_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/loglimit_test.go -------------------------------------------------------------------------------- /worker/provider.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/provider.go -------------------------------------------------------------------------------- /worker/provider_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/provider_test.go -------------------------------------------------------------------------------- /worker/rsync_provider.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/rsync_provider.go -------------------------------------------------------------------------------- /worker/runner.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/runner.go -------------------------------------------------------------------------------- /worker/schedule.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/schedule.go -------------------------------------------------------------------------------- /worker/schedule_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/schedule_test.go -------------------------------------------------------------------------------- /worker/two_stage_rsync_provider.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/two_stage_rsync_provider.go -------------------------------------------------------------------------------- /worker/worker.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/worker.go -------------------------------------------------------------------------------- /worker/worker_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/worker_test.go -------------------------------------------------------------------------------- /worker/zfs_hook.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/zfs_hook.go -------------------------------------------------------------------------------- /worker/zfs_hook_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tuna/tunasync/HEAD/worker/zfs_hook_test.go --------------------------------------------------------------------------------