Nav apraksta

z4yx 94cf0b4bdb fix possible null dereferencing, reported by #96 6 gadi atpakaļ
autocomplete 83fc766147 feat(bash and zsh autocompletion for tunasynctl): 9 gadi atpakaļ
cmd 7eb119b892 singleton of worker is not used, so remove it 6 gadi atpakaļ
docs 3e6e6f9b14 Update tips.md 6 gadi atpakaļ
internal d0deeb19a9 extract mirror size from rsync provider automatically 6 gadi atpakaļ
manager 1025189542 fix possible null dereferencing in server_test 6 gadi atpakaļ
systemd 28c8145137 feature(worker): limit rsync memory using cgroup 9 gadi atpakaļ
tests 5c8d90608c feature(worker): implemented multi-file configrations. closing #23 9 gadi atpakaļ
worker 94cf0b4bdb fix possible null dereferencing, reported by #96 6 gadi atpakaļ
.gitignore 03fdaeeb7f chore(cmd): added git hash and build date to version 9 gadi atpakaļ
.testandcover.bash e37bb44fa3 ci(tunasync): upload to github releases 8 gadi atpakaļ
.testpackages.txt 44af0d5e62 feature(worker): framework of mirror provider 9 gadi atpakaļ
.travis.yml 540eea8aeb set golang version to 1.11 6 gadi atpakaļ
LICENSE 78f3501e19 Initial commit 11 gadi atpakaļ
Makefile e37bb44fa3 ci(tunasync): upload to github releases 8 gadi atpakaļ
README.md 3b52f93e7e Fix ascii chart for `Job Run Process` 6 gadi atpakaļ
package.json c311648546 chore(git): Made this repo commitizen frendly 9 gadi atpakaļ

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