Sem descrição

Miao Wang e903c644f2 Fix CI test for cgroupv1 há 11 meses atrás
.github e903c644f2 Fix CI test for cgroupv1 há 11 meses atrás
.umlrootfs b372744640 update ci script há 2 anos atrás
.vscode b2a22a9bbc update editor config há 5 anos atrás
autocomplete 83fc766147 feat(bash and zsh autocompletion for tunasynctl): há 9 anos atrás
cmd ef32197fef Run go fmt há 11 meses atrás
docs bca49abd3c doc: increase default interval há 2 anos atrás
internal a6a03decf0 doc: update README and bump to v0.9.0 há 11 meses atrás
manager 95c4d54ee2 Replace boltdb with bbolt, fix #173, close #174 há 11 meses atrás
systemd 28c8145137 feature(worker): limit rsync memory using cgroup há 9 anos atrás
tests ef32197fef Run go fmt há 11 meses atrás
worker ef32197fef Run go fmt há 11 meses atrás
.gitignore 8ebace4d9a Add support for multiarch builds há 5 anos atrás
.testpackages.txt 44af0d5e62 feature(worker): framework of mirror provider há 9 anos atrás
LICENSE 78f3501e19 Initial commit há 11 anos atrás
Makefile e903c644f2 Fix CI test for cgroupv1 há 11 meses atrás
README.md a6a03decf0 doc: update README and bump to v0.9.0 há 11 meses atrás
go.mod 95c4d54ee2 Replace boltdb with bbolt, fix #173, close #174 há 11 meses atrás
go.sum 95c4d54ee2 Replace boltdb with bbolt, fix #173, close #174 há 11 meses atrás
package.json c311648546 chore(git): Made this repo commitizen frendly há 9 anos atrás

README.md

tunasync

Build Status Coverage Status Commitizen friendly GPLv3

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/.