Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRewriteRulesByMode ¶
GetRewriteRulesByMode returns caching rules for a specific mode
func MatchingRule ¶
MatchingRule finds a matching rule for the given path
func RewriteRequestByMode ¶
func RewriteRequestByMode(r *http.Request, rewriters *URLRewriters, mode int)
RewriteRequestByMode rewrites the request URL based on the mode
Types ¶
type URLRewriter ¶
type URLRewriter struct {
// contains filtered or unexported fields
}
URLRewriter holds the mirror and pattern for URL rewriting
type URLRewriters ¶
type URLRewriters struct { Ubuntu *URLRewriter UbuntuPorts *URLRewriter Debian *URLRewriter Centos *URLRewriter Alpine *URLRewriter Mu sync.RWMutex }
URLRewriters manages rewriters for different distributions
func CreateNewRewriters ¶
func CreateNewRewriters(mode int) *URLRewriters
CreateNewRewriters initializes rewriters based on mode
Click to show internal directories.
Click to hide internal directories.