بدون توضیح

WANG Ziqin 30259da0f0 fix nil pointer dereference: check err first 6 سال پیش
autocomplete 83fc766147 feat(bash and zsh autocompletion for tunasynctl): 9 سال پیش
cmd 7eb119b892 singleton of worker is not used, so remove it 6 سال پیش
docs 3e6e6f9b14 Update tips.md 6 سال پیش
internal d0deeb19a9 extract mirror size from rsync provider automatically 6 سال پیش
manager 4854d9b981 Fix test: initialize dockerHook with embedded provider 6 سال پیش
systemd 28c8145137 feature(worker): limit rsync memory using cgroup 9 سال پیش
tests 5c8d90608c feature(worker): implemented multi-file configrations. closing #23 9 سال پیش
worker 30259da0f0 fix nil pointer dereference: check err first 6 سال پیش
.gitignore 03fdaeeb7f chore(cmd): added git hash and build date to version 9 سال پیش
.testandcover.bash e37bb44fa3 ci(tunasync): upload to github releases 8 سال پیش
.testpackages.txt 44af0d5e62 feature(worker): framework of mirror provider 9 سال پیش
.travis.yml 540eea8aeb set golang version to 1.11 6 سال پیش
LICENSE 78f3501e19 Initial commit 11 سال پیش
Makefile e37bb44fa3 ci(tunasync): upload to github releases 8 سال پیش
README.md 8408236646 Update "Job Run Process" diagram according to runJobWrapper 6 سال پیش
package.json c311648546 chore(git): Made this repo commitizen frendly 9 سال پیش

README.md

tunasync

Build Status Coverage Status Commitizen friendly GPLv3

Get Started

Download

Pre-built binary for Linux x86_64 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

Setup GOPATH like this.

Then:

go get -d github.com/tuna/tunasync/cmd/tunasync
cd $GOPATH/src/github.com/tuna/tunasync
make

If you have multiple GOPATHs, replace the $GOPATH with your first one.