options

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2019 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// DfPath `dfget` path.
	DfPath string

	// DFRepo the default value is `$HOME/.small-dragonfly/dfdaemon/data/`.
	DFRepo string

	// RateLimit limit net speed,
	// format:xxxM/K.
	RateLimit string

	// Call system name.
	CallSystem string

	// Filter specified url fields.
	URLFilter string

	// Notbs indicates whether to not back source to download when p2p fails.
	Notbs bool

	// MaxProcs the maximum number of CPUs that the dfdaemon can use.
	MaxProcs int

	// Version show version.
	Version bool

	// Verbose indicates whether to be verbose.
	// If set true, log level will be 'debug'.
	Verbose bool

	// HostIP dfdaemon host ip, default: 127.0.0.1.
	HostIP string

	// Port that dfdaemon will listen, default: 65001.
	Port uint

	// Registry addr and must exist if dfdaemon is used to mirror mode,
	// format: https://xxx.xx.x:port or http://xxx.xx.x:port.
	Registry string

	// The regex download the url by P2P if url matches,
	// format:reg1,reg2,reg3.
	DownRule string

	// Cert file path,
	CertFile string

	// Key file path.
	KeyFile string

	// TrustHosts includes the trusted hosts which dfdaemon forward their
	// requests directly when dfdaemon is used to http_proxy mode.
	TrustHosts []string

	// ConfigPath is the path of dfdaemon's configuration file.
	// default value is: /etc/dragonfly/dfdaemon.yml
	ConfigPath string

	// SupernodeList specify supernode list.
	SupernodeList []string
}

Options is the configuration

func NewOption

func NewOption() *Options

NewOption returns the default options.

func (*Options) AddFlags

func (o *Options) AddFlags(fs *flag.FlagSet)

AddFlags add flags to the specified FlagSet.

Jump to

Keyboard shortcuts

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