Refactor: MainResolver

This commit is contained in:
yaling888
2022-03-28 00:44:13 +08:00
parent 9bab2c504e
commit 4502776513
8 changed files with 128 additions and 75 deletions

View File

@@ -12,6 +12,7 @@ type option struct {
interfaceName string
addrReuse bool
routingMark int
direct bool
}
type Option func(opt *option)
@@ -33,3 +34,9 @@ func WithRoutingMark(mark int) Option {
opt.routingMark = mark
}
}
func WithDirect() Option {
return func(opt *option) {
opt.direct = true
}
}