add netns option for handler and listener
This commit is contained in:
@ -23,8 +23,9 @@ type Options struct {
|
||||
Limiter traffic.TrafficLimiter
|
||||
TLSConfig *tls.Config
|
||||
Logger logger.Logger
|
||||
Observer observer.Observer
|
||||
Observer observer.Observer
|
||||
Service string
|
||||
Netns string
|
||||
}
|
||||
|
||||
type Option func(opts *Options)
|
||||
@ -89,6 +90,12 @@ func ServiceOption(service string) Option {
|
||||
}
|
||||
}
|
||||
|
||||
func NetnsOption(netns string) Option {
|
||||
return func(opts *Options) {
|
||||
opts.Netns = netns
|
||||
}
|
||||
}
|
||||
|
||||
type HandleOptions struct {
|
||||
Metadata metadata.Metadata
|
||||
}
|
||||
|
Reference in New Issue
Block a user