镜像自地址
https://github.com/tuna/tunasync.git
已同步 2025-12-05 22:16:47 +00:00
e903c644f257a9c29d5ec5a44a2247959f2c0c3b
The test binary is complied on ubuntu 22.04, linked with higher version of glibc than debian bullseye integrates after upgrading to golang 1.22 Solve this problem by disabling cgo.
tunasync
Get Started
Download
Pre-built binary for Linux x86_64 and ARM64 is available at Github releases.
Design
# Architecture
- Manager: Central instance for status and job management
- Worker: Runs mirror jobs
+------------+ +---+ +---+
| Client API | | | Job Status | | +----------+ +----------+
+------------+ | +----------------->| |--->| mirror +---->| mirror |
+------------+ | | | w | | config | | provider |
| Worker API | | H | | o | +----------+ +----+-----+
+------------+ | T | Job Control | r | |
+------------+ | T +----------------->| k | +------------+ |
| Job/Status | | P | Start/Stop/... | e | | mirror job |<----+
| Management | | S | | r | +------^-----+
+------------+ | | Update Status | | +---------+---------+
+------------+ | <------------------+ | | Scheduler |
| BoltDB | | | | | +-------------------+
+------------+ +---+ +---+
# Job Run Process
PreSyncing Syncing Success
+-----------+ +----------+ +-----------+ +-------------+ +--------------+
| pre-job +--+->| pre-exec +--->| job run +--->| post-exec +-+-->| post-success |
+-----------+ ^ +----------+ +-----------+ +-------------+ | +--------------+
| |
| +-----------------+ | Failed
+----------------+ post-fail |<---------------+
+-----------------+
Building
Go version: 1.22
# for native arch
> make all
# for other arch
> make ARCH=linux-arm64 all
Binaries are in build-$ARCH/, e.g., build-linux-amd64/.
编程语言
Go
99.2%
Shell
0.3%
Makefile
0.3%
Dockerfile
0.2%