i2pcontrol

package module
v0.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 9 Imported by: 3

README

go-i2pcontrol

An easy-to-use library for the i2pcontrol rpc interface.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RPCOpts *jsonrpc.RPCClientOpts
)

Functions

func Authenticate

func Authenticate(password string) (int, error)

Authenticate to the RPC API with a password

func BuildRequestTime added in v0.1.8

func BuildRequestTime() (float64, error)

func Call

func Call(method string, params interface{}) (map[string]interface{}, error)

Call an RPC method with params

func ClientBuildSuccess added in v0.1.8

func ClientBuildSuccess() (int, error)

func Echo

func Echo(echo string) (string, error)

Echo test the API

func ExploratoryBuildExpire

func ExploratoryBuildExpire() (int, error)

func ExploratoryBuildExpirePercentage

func ExploratoryBuildExpirePercentage() (int, error)

func ExploratoryBuildReject

func ExploratoryBuildReject() (int, error)

func ExploratoryBuildRejectPercentage

func ExploratoryBuildRejectPercentage() (int, error)

func ExploratoryBuildSuccess

func ExploratoryBuildSuccess() (int, error)

func ExploratoryBuildSuccessPercentage

func ExploratoryBuildSuccessPercentage() (int, error)

func FindUpdates

func FindUpdates() (bool, error)

FindUpdates pings the server to check for updates

func IncomingBW added in v0.1.8

func IncomingBW() (int, error)

Incoming bandwidth per second

func Initialize

func Initialize(host, port, path string)

Initialize set up the rpcClient with the specified host, port, and path

func InitializeWithSelfSignedCert

func InitializeWithSelfSignedCert(host, port, path, cert string) error

InitializeWithSelfSignedCert will set up an rpcClient which will accept a self-signed certificate, at the path speciied by cert.

func KnownPeers added in v0.1.8

func KnownPeers() (int, error)

All the known peers

func NetStatus

func NetStatus() (string, error)

NetStatus queries the status of the network connection

func OutgoingBw added in v0.1.8

func OutgoingBw() (int, error)

Outgoing bandwidth per second

func ParticipatingAverageTunnels added in v0.1.8

func ParticipatingAverageTunnels() (int, error)

func ParticipatingHourAverageTunnels added in v0.1.8

func ParticipatingHourAverageTunnels() (int, error)

func ParticipatingTunnels

func ParticipatingTunnels() (int, error)

ParticipatingTunnels gets the number of participating tunnels the router has currently

func RateStat

func RateStat(Stat string, Period int) (int, error)

RateStat executes a GetRate call

func RateStatExact added in v0.1.8

func RateStatExact(Stat string, Period int) (float64, error)

func ReceiveBps

func ReceiveBps() (int, error)

func ReceiveBpsHourAverage added in v0.1.8

func ReceiveBpsHourAverage() (int, error)

func Reseeding

func Reseeding() (bool, error)

Reseeding checks if the I2P Router is reseeding

func Restart

func Restart() (string, error)

Restart the router immediately

func RestartGraceful

func RestartGraceful() (string, error)

RestartGraceful initiates a graceful restart, which will occur in around 11 minutes.

func SendBps

func SendBps() (int, error)

func SendBpsHourAverage added in v0.1.8

func SendBpsHourAverage() (int, error)

func Shutdown

func Shutdown() (string, error)

Shutdown the router immediately

func ShutdownGraceful

func ShutdownGraceful() (string, error)

Shutdown initiates a graceful restart, which will occur in around 11 minutes.

func Status

func Status() (string, error)

Status queries the status of the router

func UpTime added in v0.1.8

func UpTime() (int64, error)

Uptime of the router

func Update

func Update() (string, error)

Starts an update.

func Upnp added in v0.1.8

func Upnp() (string, error)

Checks our UPnp

func Version added in v0.1.8

func Version() (string, error)

Gets the current router version

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL