mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-20 16:23:53 +01:00
allow multiple docker providers, added file provider support
This commit is contained in:
@@ -6,7 +6,7 @@ import (
|
||||
)
|
||||
|
||||
type pathPoolMap struct {
|
||||
*SafeMap[string, *httpLoadBalancePool]
|
||||
SafeMap[string, *httpLoadBalancePool]
|
||||
}
|
||||
|
||||
func newPathPoolMap() pathPoolMap {
|
||||
@@ -21,7 +21,8 @@ func (m pathPoolMap) Add(path string, route *HTTPRoute) {
|
||||
}
|
||||
|
||||
func (m pathPoolMap) FindMatch(pathGot string) (*HTTPRoute, error) {
|
||||
for pathWant, v := range m.m {
|
||||
pool := m.Iterator()
|
||||
for pathWant, v := range pool {
|
||||
if strings.HasPrefix(pathGot, pathWant) {
|
||||
return v.Pick(), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user