dhtutil

package
v0.0.0-...-e033ab4 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2014 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DHTStorage

type DHTStorage struct {
	// Filename of the SQLite3 database to use.
	// Leave blank to use a sensible default.
	Filename string
}

func (*DHTStorage) LoadDHT

func (ds *DHTStorage) LoadDHT(d *dht.DHT) error

Loads the node database into the running DHT. Call this just after running the DHT.

func (*DHTStorage) LoadDHTConfig

func (ds *DHTStorage) LoadDHTConfig(cfg *dht.Config) error

Loads the node ID and port number from the database and sets the values in the Config.

func (*DHTStorage) SaveDHT

func (ds *DHTStorage) SaveDHT(d *dht.DHT) error

Saves the node database into the DHT. Call this periodically or just before stopping the DHT. The current Node ID and port number are also saved.

Jump to

Keyboard shortcuts

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