config

package
v6.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2021 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusDir          = "/var/lib/trafficcontrol-cache-config/status"
	GenerateCmd        = "/usr/bin/t3c-generate" // TODO don't make absolute?
	Chkconfig          = "/sbin/chkconfig"
	Service            = "/sbin/service"
	SystemCtl          = "/bin/systemctl"
	TmpBase            = "/tmp/trafficcontrol-cache-config"
	TrafficCtl         = "/bin/traffic_ctl"
	TrafficServerOwner = "ats"
)
View Source
const (
	UseGitAuto    = "auto"
	UseGitYes     = "yes"
	UseGitNo      = "no"
	UseGitInvalid = ""
)
View Source
const (
	WaitForParentsTrue    = "true"
	WaitForParentsFalse   = "false"
	WaitForParentsReval   = "reval"
	WaitForParentsInvalid = ""
)
View Source
const DefaultTSConfigDir = "/opt/trafficserver/etc/trafficserver"
View Source
const WaitForParentsDefault = WaitForParentsReval

Variables

View Source
var TSHome string = "/opt/trafficserver"

Functions

func GetTSPackageHome

func GetTSPackageHome() string

derives the ATS Installation directory from the rpm config file list.

func Usage

func Usage()

Types

type Cfg

type Cfg struct {
	LogLocationDebug    string
	LogLocationErr      string
	LogLocationInfo     string
	LogLocationWarn     string
	CacheHostName       string
	SvcManagement       SvcManagement
	Retries             int
	ReverseProxyDisable bool
	SkipOSCheck         bool
	TOInsecure          bool
	TOTimeoutMS         time.Duration
	TOUser              string
	TOPass              string
	TOURL               string
	DNSLocalBind        bool
	WaitForParents      bool
	YumOptions          string
	// UseGit is whether to create and maintain a git repo of config changes.
	// Note this only applies to the ATS config directory inferred or set via the flag.
	//      It does not do anything for config files generated outside that location.
	UseGit                      UseGitFlag
	NoCache                     bool
	SyncDSUpdatesIPAllow        bool
	OmitViaStringRelease        bool
	NoOutgoingIP                bool
	DisableParentConfigComments bool
	DefaultClientEnableH2       *bool
	DefaultClientTLSVersions    *string
	// MaxMindLocation is a URL string for a download location for a maxmind database
	// for use with either HeaderRewrite or Maxmind_ACL plugins
	MaxMindLocation string
	TsHome          string
	TsConfigDir     string

	ServiceAction     t3cutil.ApplyServiceActionFlag
	ReportOnly        bool
	Files             t3cutil.ApplyFilesFlag
	InstallPackages   bool
	IgnoreUpdateFlag  bool
	NoUnsetUpdateFlag bool
	UpdateIPAllow     bool
}

func GetCfg

func GetCfg() (Cfg, error)

func (Cfg) DebugLog

func (cfg Cfg) DebugLog() log.LogLocation

func (Cfg) ErrorLog

func (cfg Cfg) ErrorLog() log.LogLocation

func (Cfg) EventLog

func (cfg Cfg) EventLog() log.LogLocation

func (Cfg) InfoLog

func (cfg Cfg) InfoLog() log.LogLocation

func (Cfg) WarningLog

func (cfg Cfg) WarningLog() log.LogLocation

type SvcManagement

type SvcManagement int
const (
	Unknown SvcManagement = 0
	SystemD SvcManagement = 1
	SystemV SvcManagement = 2 // legacy System V Init.
)

func (SvcManagement) String

func (s SvcManagement) String() string

type UseGitFlag

type UseGitFlag string

func StrToUseGitFlag

func StrToUseGitFlag(str string) UseGitFlag

type WaitForParentsFlag

type WaitForParentsFlag string

func StrToWaitForParentsFlag

func StrToWaitForParentsFlag(str string) WaitForParentsFlag

Jump to

Keyboard shortcuts

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