feat: transform circuitbreaker layer in authn-network layer
This commit is contained in:
25
internal/proxy/director/layer/authn/options.go
Normal file
25
internal/proxy/director/layer/authn/options.go
Normal file
@ -0,0 +1,25 @@
|
||||
package authn
|
||||
|
||||
type Options struct {
|
||||
TemplateDir string
|
||||
}
|
||||
|
||||
type OptionFunc func(*Options)
|
||||
|
||||
func NewOptions(funcs ...OptionFunc) *Options {
|
||||
opts := &Options{
|
||||
TemplateDir: "./templates",
|
||||
}
|
||||
|
||||
for _, fn := range funcs {
|
||||
fn(opts)
|
||||
}
|
||||
|
||||
return opts
|
||||
}
|
||||
|
||||
func WithTemplateDir(templateDir string) OptionFunc {
|
||||
return func(o *Options) {
|
||||
o.TemplateDir = templateDir
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user