Socket
Book a DemoInstallSign in
Socket

github.com/lovercode/arigo

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/lovercode/arigo

v0.0.1
Source
Go
Version published
Created
Source

arigo

Build Status Go Report Card Documentation

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:

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

package main

import (
	"fmt"
	"github.com/lovercode/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)
}

FAQs

Package last updated on 07 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.