mirror of
https://github.com/tuna/tunasync.git
synced 2025-04-20 20:22:46 +00:00
docs: new desgin
This commit is contained in:
parent
29d4b55bc6
commit
33611cee8e
49
README.md
49
README.md
@ -1,14 +1,45 @@
|
|||||||
tunasync
|
tunasync
|
||||||
========
|
========
|
||||||
|
|
||||||
|
## Design
|
||||||
|
|
||||||
|
```
|
||||||
|
# Architecture
|
||||||
|
|
||||||
|
- Manager: Centural instance on status and job management
|
||||||
|
- Worker: Runs mirror jobs
|
||||||
|
|
||||||
|
|
||||||
|
+----------+ +---+ worker configs +---+ +----------+ +----------+
|
||||||
|
| Status | | |+-----------------> | w +--->| mirror +---->| mirror |
|
||||||
|
| Manager | | | | o | | config | | provider |
|
||||||
|
+----------+ | W | start/stop job | r | +----------+ +----+-----+
|
||||||
|
| E |+-----------------> | k | |
|
||||||
|
+----------+ | B | | e | +------------+ |
|
||||||
|
| Job | | | update status | r |<------+ mirror job |<----+
|
||||||
|
|Controller| | | <-----------------+| | +------------+
|
||||||
|
+----------+ +---+ +---+
|
||||||
|
|
||||||
|
|
||||||
|
# Job Run Process
|
||||||
|
|
||||||
|
+-----------+ +-----------+ +-------------+ +--------------+
|
||||||
|
| pre-job +--+->| job run +--->| post-job +-+-->| post-success |
|
||||||
|
+-----------+ ^ +-----------+ +-------------+ | +--------------+
|
||||||
|
| |
|
||||||
|
| +-----------------+ |
|
||||||
|
+------+ post-fail |<---------+
|
||||||
|
+-----------------+
|
||||||
|
```
|
||||||
|
|
||||||
## TODO
|
## TODO
|
||||||
|
|
||||||
- [ ] use context manager to handle job contexts
|
- [ ] split to `tunasync-manager` and `tunasync-worker` instances
|
||||||
- [x] Hooks need "before_exec", "after_exec"
|
- use HTTP as communication protocol
|
||||||
- [x] implement `tunasynctl tail` and `tunasynctl log` or equivalent feature
|
- Web frontend for `tunasync-manager`
|
||||||
- [x] status file
|
- [ ] start/stop/restart job
|
||||||
- [ ] mirror size
|
- [ ] enable/disable mirror
|
||||||
- [x] upstream
|
- [ ] view log
|
||||||
- [x] btrfs backend (create snapshot before syncing)
|
- [ ] config file structure
|
||||||
- [x] add mirror job online
|
- [ ] support multi-file configuration (`/etc/tunasync.d/mirror-enabled/*.conf`)
|
||||||
- [x] use toml as configuration
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user