https://github.com/siku2/arigo
aria2 client for go
https://github.com/siku2/arigo
aria2 golang-library
Last synced: about 1 year ago
JSON representation
aria2 client for go
- Host: GitHub
- URL: https://github.com/siku2/arigo
- Owner: siku2
- License: mit
- Created: 2019-04-14T19:47:58.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2025-04-26T13:09:44.000Z (about 1 year ago)
- Last Synced: 2025-04-26T14:22:21.617Z (about 1 year ago)
- Topics: aria2, golang-library
- Language: Go
- Homepage:
- Size: 54.7 KB
- Stars: 49
- Watchers: 2
- Forks: 21
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# arigo
[](https://github.com/siku2/arigo/actions/workflows/build.yml)
[](https://goreportcard.com/report/github.com/siku2/arigo)
[](http://godoc.org/github.com/siku2/arigo)
A client library for the aria2 RPC interface.
Features:
- Complete implementation of all supported methods.
- Bidirectional communication over WebSocket which makes it
possible to receive events and know when a download has completed.
arigo currently doesn't start and manage the aria2c process for you.
To start aria2 use the following command:
```bash
aria2c --enable-rpc --rpc-listen-all
```
If aria2 is not installed then head on to
https://aria2.github.io/ and follow the instructions there.
## Example
```go
package main
import (
"fmt"
"github.com/siku2/arigo"
)
func main() {
c, err := arigo.Dial("ws://localhost:6800/jsonrpc", "")
if err != nil {
panic(err)
}
// Download is a utility method which calls AddURI and
// then waits for the download to complete
status, err := c.Download(arigo.URIs("https://example.org/file"), nil)
if err != nil {
panic(err)
}
// download complete
fmt.Println(status.GID)
}
```