Documentation ¶
Index ¶
Constants ¶
View Source
const ( ParentSelectionTypeConsistentHash = ParentSelectionType("consistent-hash") ParentSelectionTypeRoundRobin = ParentSelectionType("round-robin") ParentSelectionTypeInvalid = ParentSelectionType("") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ParentSelectionType ¶
type ParentSelectionType string
ParentSelectionType is the algorithm to use for selecting parents.
func ParentSelectionTypeFromString ¶
func ParentSelectionTypeFromString(s string) ParentSelectionType
func (ParentSelectionType) String ¶
func (t ParentSelectionType) String() string
type QueryStringRule ¶
type RemapRule ¶
type RemapRule struct { RemapRuleBase Timeout *time.Duration ParentSelection *ParentSelectionType To []RemapRuleTo Allow []*net.IPNet Deny []*net.IPNet RetryCodes map[int]struct{} ConsistentHash chash.ATSConsistentHash Cache icache.Cache Plugins map[string]interface{} }
func (RemapRule) URI ¶
func (r RemapRule) URI(fromURI string, path string, query string, failures int) (string, *url.URL, *http.Transport)
URI takes a request URI and maps it to the real URI to proxy-and-cache. The `failures` parameter indicates how many parents have tried and failed, indicating to skip to the nth hashed parent. Returns the URI to request, and the proxy URL (if any)
type RemapRuleBase ¶
type RemapRuleBase struct { Name string `json:"name"` From string `json:"from"` CertificateFile string `json:"certificate-file"` CertificateKeyFile string `json:"certificate-key-file"` ConnectionClose bool `json:"connection-close"` QueryString QueryStringRule `json:"query-string"` // ConcurrentRuleRequests is the number of concurrent requests permitted to a remap rule, that is, to an origin. If this is 0, the global config is used. ConcurrentRuleRequests int `json:"concurrent_rule_requests"` RetryNum *int `json:"retry_num"` DSCP int `json:"dscp"` }
type RemapRuleTo ¶
type RemapRuleToBase ¶
Click to show internal directories.
Click to hide internal directories.