add router interface

This commit is contained in:
ginuerzh
2024-07-08 22:28:21 +08:00
parent 30cc928705
commit 48d070d345
20 changed files with 37 additions and 1112 deletions

View File

@ -16,7 +16,7 @@ import (
type Options struct {
Bypass bypass.Bypass
Router *chain.Router
Router chain.Router
Auth *url.Userinfo
Auther auth.Authenticator
RateLimiter rate.RateLimiter
@ -36,7 +36,7 @@ func BypassOption(bypass bypass.Bypass) Option {
}
}
func RouterOption(router *chain.Router) Option {
func RouterOption(router chain.Router) Option {
return func(opts *Options) {
opts.Router = router
}