Files
isp-gate-service/approve/matcher/matcher.go
T
2019-11-06 16:38:50 +03:00

19 lines
351 B
Go

package matcher
type Matcher interface {
Match(method string) []string
}
func NewRuntimeMatcher(patterns []string) Matcher {
return &runtimeMatcher{
patterns: patterns,
}
}
func NewCacheableMatcher(patterns []string) Matcher {
return &cacheableMatcher{
cache: make(map[string][]string, 0),
rm: runtimeMatcher{patterns: patterns},
}
}