add ingress interface
This commit is contained in:
@ -20,6 +20,7 @@ type Options struct {
|
||||
RateLimiter rate.RateLimiter
|
||||
TLSConfig *tls.Config
|
||||
Logger logger.Logger
|
||||
Service string
|
||||
}
|
||||
|
||||
type Option func(opts *Options)
|
||||
@ -66,6 +67,12 @@ func LoggerOption(logger logger.Logger) Option {
|
||||
}
|
||||
}
|
||||
|
||||
func ServiceOption(service string) Option {
|
||||
return func(opts *Options) {
|
||||
opts.Service = service
|
||||
}
|
||||
}
|
||||
|
||||
type HandleOptions struct {
|
||||
Metadata metadata.Metadata
|
||||
}
|
||||
|
5
ingress/ingress.go
Normal file
5
ingress/ingress.go
Normal file
@ -0,0 +1,5 @@
|
||||
package ingress
|
||||
|
||||
type Ingress interface {
|
||||
Get(host string) string
|
||||
}
|
Reference in New Issue
Block a user