Documentation ¶
Index ¶
- Constants
- func FilterDSS(dsses []tc.DeliveryServiceServer, dsIDs map[int]struct{}, ...) []tc.DeliveryServiceServer
- func FilterParams(params []tc.Parameter, configFile string, name string, value string, ...) []tc.Parameter
- func GetAllConfigs(toData *config.TOData, revalOnly bool, dir string, appVersion string, ...) ([]config.ATSConfigFile, error)
- func GetConfigFile(toData *config.TOData, fileInfo atscfg.CfgMeta, hdrCommentTxt string) (string, string, string, error)
- func GetSSLCertsAndKeyFiles(toData *config.TOData) ([]config.ATSConfigFile, error)
- func GetTOData(cfg config.TCCfg) (*config.TOData, []net.Addr, error)
- func Make12MFacts(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakeATSDotRules(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakeAstatsDotConfig(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakeBGFetchDotConfig(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakeCacheDotConfig(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakeCacheURL(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakeCacheURLPlain(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakeChkconfig(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakeConfigFilesList(toData *config.TOData, dir string) ([]atscfg.CfgMeta, []string, error)
- func MakeDropQStringDotConfig(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakeHeaderRewrite(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakeHeaderRewriteMid(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakeHostingDotConfig(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakeIPAllowDotConfig(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakeLoggingDotConfig(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakeLoggingDotYAML(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakeLogsXMLDotConfig(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakePackages(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakeParentDotConfig(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakePluginDotConfig(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakeRecordsDotConfig(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakeRegexRemap(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakeRegexRevalidateDotConfig(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakeRemapDotConfig(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakeSSLMultiCertDotConfig(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakeSetDSCP(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakeStorageDotConfig(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakeSysCtlDotConf(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakeTopologyHeaderRewrite(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakeURISigningConfig(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakeURLSigConfig(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakeUnknownConfig(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func MakeVolumeDotConfig(toData *config.TOData, fileName string, hdrCommentTxt string) (atscfg.Cfg, error)
- func ParamsToMap(params []tc.Parameter) map[string]string
- func ParamsToMultiMap(params []tc.Parameter) map[string][]string
- func PreprocessConfigFile(server *atscfg.Server, cfgFile string) string
- func WriteConfigs(configs []config.ATSConfigFile, output io.Writer) error
- type ATSConfigFiles
- type ConfigFileFunc
- type ConfigFileLiteralFunc
- type ConfigFilePrefixSuffixFunc
Constants ¶
const HdrConfigFilePath = "Path"
const HdrLineComment = "Line-Comment"
const TrafficOpsProxyParameterName = `tm.rev_proxy.url`
Variables ¶
This section is empty.
Functions ¶
func FilterParams ¶
func FilterParams(params []tc.Parameter, configFile string, name string, value string, omitName string) []tc.Parameter
FilterParams filters params and returns only the parameters which match configFile, name, and value. If configFile, name, or value is the empty string, it is not filtered. Returns a slice of parameters.
func GetAllConfigs ¶
func GetAllConfigs( toData *config.TOData, revalOnly bool, dir string, appVersion string, toURL string, toIPs []net.Addr, ) ([]config.ATSConfigFile, error)
GetAllConfigs gets all config files for cfg.CacheHostName.
func GetConfigFile ¶
func GetConfigFile(toData *config.TOData, fileInfo atscfg.CfgMeta, hdrCommentTxt string) (string, string, string, error)
GetConfigFile returns the text of the generated config file, the MIME Content Type of the config file, and any error.
func GetSSLCertsAndKeyFiles ¶
func GetSSLCertsAndKeyFiles(toData *config.TOData) ([]config.ATSConfigFile, error)
func GetTOData ¶
GetTOData gets all the data from Traffic Ops needed to generate config. Returns the data, the addresses of all Traffic Ops' requested, and any error.
func Make12MFacts ¶
func MakeATSDotRules ¶
func MakeAstatsDotConfig ¶
func MakeBGFetchDotConfig ¶
func MakeCacheDotConfig ¶
func MakeCacheURL ¶
func MakeCacheURLPlain ¶
func MakeChkconfig ¶
func MakeConfigFilesList ¶
MakeConfigFilesList returns the list of config files, any warnings, and any error.
func MakeHeaderRewrite ¶
func MakeHeaderRewriteMid ¶
func MakeHostingDotConfig ¶
func MakeIPAllowDotConfig ¶
func MakeLoggingDotConfig ¶
func MakeLoggingDotYAML ¶
func MakeLogsXMLDotConfig ¶
func MakePackages ¶
func MakeParentDotConfig ¶
func MakePluginDotConfig ¶
func MakeRecordsDotConfig ¶
func MakeRegexRemap ¶
func MakeRemapDotConfig ¶
func MakeSetDSCP ¶
func MakeStorageDotConfig ¶
func MakeSysCtlDotConf ¶
func MakeURISigningConfig ¶
func MakeURLSigConfig ¶
func MakeUnknownConfig ¶
func MakeVolumeDotConfig ¶
func ParamsToMap ¶
ParamsToMap converts a []tc.Parameter to a map[paramName]paramValue. If multiple params have the same value, the first one in params will be used an an error will be logged. See ParamArrToMultiMap.
func ParamsToMultiMap ¶
ParamArrToMultiMap converts a []tc.Parameter to a map[paramName][]paramValue.
func PreprocessConfigFile ¶
PreprocessConfigFile does global preprocessing on the given config file cfgFile. This is mostly string replacements of __X__ directives. See the code for the full list of replacements. These things were formerly done by ORT, but need to be processed by atstccfg now, because ORT no longer has the metadata necessary.
func WriteConfigs ¶
func WriteConfigs(configs []config.ATSConfigFile, output io.Writer) error
WriteConfigs writes the given configs as a RFC2046§5.1 MIME multipart/mixed message.
Types ¶
type ATSConfigFiles ¶
type ATSConfigFiles []config.ATSConfigFile
ATSConfigFiles implements sort.Interface to sort by path.
func (ATSConfigFiles) Len ¶
func (p ATSConfigFiles) Len() int
func (ATSConfigFiles) Less ¶
func (p ATSConfigFiles) Less(i, j int) bool
func (ATSConfigFiles) Swap ¶
func (p ATSConfigFiles) Swap(i, j int)
type ConfigFileFunc ¶
type ConfigFileLiteralFunc ¶
type ConfigFileLiteralFunc struct { Name string Func ConfigFileFunc }
type ConfigFilePrefixSuffixFunc ¶
type ConfigFilePrefixSuffixFunc struct { Prefix string Suffix string Func ConfigFileFunc }