Bez popisu

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

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.