emissary/internal/server/option.go

22 lines
343 B
Go
Raw Permalink Normal View History

2023-02-02 10:55:24 +01:00
package server
import "forge.cadoles.com/Cadoles/emissary/internal/config"
type Option struct {
Config *config.Config
}
type OptionFunc func(*Option)
func defaultOption() *Option {
return &Option{
Config: config.NewDefault(),
}
}
func WithConfig(conf *config.Config) OptionFunc {
return func(opt *Option) {
opt.Config = conf
}
}