global

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// HomeDir is the user home
	HomeDir string

	// UseHTTPS indicates whether to use HTTPS protocol
	UseHTTPS bool

	// CommandLine stores all the command line parameters
	CommandLine CommandParam

	// RegProto is the protocol(HTTP/HTTPS) of images registry
	RegProto string

	// RegDomain is the domain of images registry
	RegDomain string

	// DFPattern is the url patterns. Dfdaemon starts downloading by P2P if the downloading url matches DFPattern.
	DFPattern = make(map[string]*regexp.Regexp)
)

Functions

func CopyDfPattern

func CopyDfPattern() []string

CopyDfPattern is to copy DFPattern's content.

func MatchDfPattern

func MatchDfPattern(location string) bool

MatchDfPattern returns true if location matches DFPattern, otherwise returns false.

func UpdateDFPattern

func UpdateDFPattern(reg string)

UpdateDFPattern is to update DFPattern from the giving string(CommandParam.DownRule).

Types

type CommandParam

type CommandParam struct {
	DfPath     string
	DFRepo     string
	RateLimit  string
	CallSystem string
	URLFilter  string
	Notbs      bool
	HostIP     string
	Registry   string //https://xxx.xx.x:port or http://xxx.xx.x:port
}

CommandParam is a struct that stores all the command line parameters

Jump to

Keyboard shortcuts

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