added namespace to http functional options

This commit is contained in:
A.Unger
2019-12-24 11:51:38 +01:00
parent 2040b4d172
commit 003a124071
2 changed files with 13 additions and 5 deletions

BIN
cmd/ocis-ocs/ocis-ocs Executable file
View File

Binary file not shown.

View File

@@ -14,11 +14,12 @@ type Option func(o *Options)
// Options defines the available options for this package.
type Options struct {
Logger log.Logger
Context context.Context
Config *config.Config
Metrics *metrics.Metrics
Flags []cli.Flag
Namespace string
Logger log.Logger
Context context.Context
Config *config.Config
Metrics *metrics.Metrics
Flags []cli.Flag
}
// newOptions initializes the available default options.
@@ -66,3 +67,10 @@ func Flags(val []cli.Flag) Option {
o.Flags = append(o.Flags, val...)
}
}
// Namespace provides a function to set the Namespace option.
func Namespace(val string) Option {
return func(o *Options) {
o.Namespace = val
}
}