This repository has been archived by the owner on Dec 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 773
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: auto generate Dragonfly cli/api docs via code
Signed-off-by: pouchrobot <[email protected]>
- Loading branch information
1 parent
b1a405c
commit 4fb7772
Showing
7 changed files
with
104 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
## supernode | ||
|
||
the central control server of Dragonfly used for scheduling and cdn cache | ||
|
||
### Synopsis | ||
|
||
SuperNode is a long-running process with two primary responsibilities: | ||
It's the tracker and scheduler in the P2P network that choose appropriate downloading net-path for each peer. | ||
It's also a CDN server that caches downloaded data from source to avoid downloading the same files from source repeatedly. | ||
|
||
``` | ||
supernode [flags] | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
--advertise-ip string the supernode ip is the ip we advertise to other peers in the p2p-network | ||
--config string the path of supernode's configuration file (default "/etc/dragonfly/supernode.yml") | ||
-D, --debug switch daemon log level to DEBUG mode | ||
--down-limit int download limit for supernode to serve download tasks (default 4) | ||
--download-port int downloadPort is the port for download files from supernode (default 8001) | ||
--fail-access-interval duration fail access interval is the interval time after failed to access the URL (default 3m0s) | ||
--gc-initial-delay duration gc initial delay is the delay time from the start to the first GC execution (default 6s) | ||
--gc-meta-interval duration gc meta interval is the interval time to execute the GC meta (default 2m0s) | ||
-h, --help help for supernode | ||
--home-dir string homeDir is the working directory of supernode (default "/home/admin/supernode") | ||
--max-bandwidth rate network rate that supernode can use (default 200MB) | ||
--peer-gc-delay duration peer gc delay is the delay time to execute the GC after the peer has reported the offline (default 3m0s) | ||
--pool-size int pool size is the core pool size of ScheduledExecutorService (default 10) | ||
--port int listenPort is the port that supernode server listens on (default 8002) | ||
--profiler profiler sets whether supernode HTTP server setups profiler | ||
--system-bandwidth rate network rate reserved for system (default 20MB) | ||
--task-expire-time duration task expire time is the time that a task is treated expired if the task is not accessed within the time (default 3m0s) | ||
--up-limit int upload limit for a peer to serve download tasks (default 5) | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [supernode gen-doc](supernode_gen-doc.md) - Generate Document for supernode command line tool in MarkDown format | ||
* [supernode version](supernode_version.md) - Show the current version of supernode | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
## supernode gen-doc | ||
|
||
Generate Document for supernode command line tool in MarkDown format | ||
|
||
### Synopsis | ||
|
||
Generate Document for supernode command line tool in MarkDown format | ||
|
||
``` | ||
supernode gen-doc [flags] | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-h, --help help for gen-doc | ||
-p, --path string destination path of generated markdown documents (default "/tmp") | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [supernode](supernode.md) - the central control server of Dragonfly used for scheduling and cdn cache | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
## supernode version | ||
|
||
Show the current version of supernode | ||
|
||
### Synopsis | ||
|
||
Display the version and build information of Dragonfly supernode, including GoVersion, OS, Arch, Version, BuildDate and GitCommit. | ||
|
||
``` | ||
supernode version [flags] | ||
``` | ||
|
||
### Examples | ||
|
||
``` | ||
supernode version 0.4.1 | ||
Git commit: 6fd5c8f | ||
Build date: 20190717-15:57:52 | ||
Go version: go1.12.10 | ||
OS/Arch: linux/amd64 | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-h, --help help for version | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [supernode](supernode.md) - the central control server of Dragonfly used for scheduling and cdn cache | ||
|