Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Commit

Permalink
docs: auto generate Dragonfly cli/api docs via code
Browse files Browse the repository at this point in the history
Signed-off-by: pouchrobot <[email protected]>
  • Loading branch information
pouchrobot committed Dec 1, 2019
1 parent b1a405c commit 4fb7772
Show file tree
Hide file tree
Showing 7 changed files with 104 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/cli_reference/dfdaemon.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ dfdaemon [flags]

### SEE ALSO

* [dfdaemon gen-doc](dfdaemon_gen-doc.md) - Generate Document for dfdaemon command line tool with MarkDown format
* [dfdaemon gen-doc](dfdaemon_gen-doc.md) - Generate Document for dfdaemon command line tool in MarkDown format
* [dfdaemon version](dfdaemon_version.md) - Show the current version of dfdaemon

4 changes: 2 additions & 2 deletions docs/cli_reference/dfdaemon_gen-doc.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## dfdaemon gen-doc

Generate Document for dfdaemon command line tool with MarkDown format
Generate Document for dfdaemon command line tool in MarkDown format

### Synopsis

Generate Document for dfdaemon command line tool with MarkDown format
Generate Document for dfdaemon command line tool in MarkDown format

```
dfdaemon gen-doc [flags]
Expand Down
2 changes: 1 addition & 1 deletion docs/cli_reference/dfget.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ download SUCCESS cost:0.026s length:141898 reason:0

### SEE ALSO

* [dfget gen-doc](dfget_gen-doc.md) - Generate Document for dfget command line tool with MarkDown format
* [dfget gen-doc](dfget_gen-doc.md) - Generate Document for dfget command line tool in MarkDown format
* [dfget server](dfget_server.md) - Launch a peer server for uploading files.
* [dfget version](dfget_version.md) - Show the current version of dfget

4 changes: 2 additions & 2 deletions docs/cli_reference/dfget_gen-doc.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## dfget gen-doc

Generate Document for dfget command line tool with MarkDown format
Generate Document for dfget command line tool in MarkDown format

### Synopsis

Generate Document for dfget command line tool with MarkDown format
Generate Document for dfget command line tool in MarkDown format

```
dfget gen-doc [flags]
Expand Down
42 changes: 42 additions & 0 deletions docs/cli_reference/supernode.md
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

23 changes: 23 additions & 0 deletions docs/cli_reference/supernode_gen-doc.md
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

33 changes: 33 additions & 0 deletions docs/cli_reference/supernode_version.md
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

0 comments on commit 4fb7772

Please sign in to comment.