add ingress interface

This commit is contained in:
ginuerzh
2023-01-14 13:09:24 +08:00
parent 36ed0eae2d
commit 1a8c1ccb1d
2 changed files with 12 additions and 0 deletions

View File

@ -20,6 +20,7 @@ type Options struct {
RateLimiter rate.RateLimiter RateLimiter rate.RateLimiter
TLSConfig *tls.Config TLSConfig *tls.Config
Logger logger.Logger Logger logger.Logger
Service string
} }
type Option func(opts *Options) 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 { type HandleOptions struct {
Metadata metadata.Metadata Metadata metadata.Metadata
} }

5
ingress/ingress.go Normal file
View File

@ -0,0 +1,5 @@
package ingress
type Ingress interface {
Get(host string) string
}