Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Regexes ¶
type Regexes struct { DirectMatches map[string]tc.DeliveryServiceName DotStartSlashDotFooSlashDotDotStar map[string]tc.DeliveryServiceName RegexMatch map[*regexp.Regexp]tc.DeliveryServiceName }
Regexes maps Delivery Service Regular Expressions to delivery services. For performance, we categorize Regular Expressions into 3 categories: 1. Direct string matches, with no regular expression matching characters 2. .*\.foo\..* expressions, where foo is a direct string match with no regular expression matching characters 3. Everything else This allows us to do a cheap match on 1 and 2, and only regex match the uncommon case.
func Get ¶
getDeliveryServiceRegexes gets the regexes of each delivery service, for the given CDN, from Traffic Ops. Returns a map[deliveryService][]regex.
func (Regexes) DeliveryService ¶
func (d Regexes) DeliveryService(domain, subdomain, subsubdomain string) (tc.DeliveryServiceName, bool)
DeliveryService returns the delivery service which matches the given fqdn, or false.
type Ths ¶
type Ths struct {
// contains filtered or unexported fields
}
Ths provides threadsafe access to a ThsT pointer. Note the object itself is not safe for multiple access, and must not be mutated, either by the original owner after calling Set, or by future users who call Get. If you need to mutate, perform a deep copy.