conf

package
v0.0.0-...-e39fa98 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2019 License: LGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppDir

func AppDir() string

AppDir returns the application directory on this node where process generated files are placed.

func ChunkSize

func ChunkSize() int32

ChunkSize returns the size of each chunk of a file.

func DisconnectTimeout

func DisconnectTimeout() time.Duration

DisconnectTimeout returns the disconnect timeout.

func DownloadTimeout

func DownloadTimeout() time.Duration

DownloadTimeout returns the download timeout.

func DownloadsDir

func DownloadsDir() string

DownloadsDir returns the downloads directory on this node where the downloaded files are placed.

func Load

func Load(fpath string) error

Load loads the specified configuration file, returning an error if any.

func LogLevel

func LogLevel() string

LogLevel is the level for the app-wide logger.

func MinIndexFiles

func MinIndexFiles() int32

MinIndexFiles returns the minimum cumulative number of files that each node should index to enter the network.

func NodeConnectTimeout

func NodeConnectTimeout() time.Duration

NodeConnectTimeout returns the node connect timeout.

func NodePort

func NodePort() string

NodePort returns the port exposed by each Node for communication with the other nodes and the tracker.

func PingTimeout

func PingTimeout() time.Duration

PingTimeout returns the ping timeout.

func SearchTimeout

func SearchTimeout() time.Duration

SearchTimeout returns the search timeout.

func ShareDirs

func ShareDirs() []string

ShareDirs returns the share directories on this node that need to be indexed when the node starts up.

func TrackerConnectTimeout

func TrackerConnectTimeout() time.Duration

TrackerConnectTimeout returns the tracker connect timeout.

func TrackerHost

func TrackerHost() string

TrackerHost returns the host of the tracker.

func TrackerPort

func TrackerPort() string

TrackerPort returns the port of the tracker.

func UpdateDownloadsDir

func UpdateDownloadsDir(value string)

UpdateDownloadsDir sets the downlods directory in the config file to the given value.

func UpdateShareDirs

func UpdateShareDirs(value []string)

UpdateShareDirs sets the share directories in the config file to the given values.

func UpdateTracker

func UpdateTracker(host string)

UpdateTracker updates the IP address of the tracker in the config file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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