params

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

type Reader interface {
	// DNS getters
	GetProviders() (providers []string, err error)
	GetPrivateAddresses() (privateAddresses []string, err error)

	// Unbound getters
	GetListeningPort() (listeningPort uint16, err error)
	GetCaching() (caching bool, err error)
	GetVerbosity() (verbosityLevel uint8, err error)
	GetVerbosityDetails() (verbosityDetailsLevel uint8, err error)
	GetValidationLogLevel() (validationLogLevel uint8, err error)
	GetCheckUnbound() (check bool, err error)
	GetIPv4() (doIPv4 bool, err error)
	GetIPv6() (doIPv6 bool, err error)

	// Blocking getters
	GetMaliciousBlocking() (blocking bool, err error)
	GetSurveillanceBlocking() (blocking bool, err error)
	GetAdsBlocking() (blocking bool, err error)
	GetUnblockedHostnames() (hostnames []string, err error)
	GetBlockedHostnames() (hostnames []string, err error)
	GetBlockedIPs() (IPs []string, err error)

	// Update getters
	GetUpdatePeriod() (period time.Duration, err error)
}

Reader contains methods to obtain parameters.

func NewParamsReader

func NewParamsReader(logger logging.Logger) Reader

NewParamsReader returns a paramsReadeer object to read parameters from environment variables.

Jump to

Keyboard shortcuts

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