restructure runtime code

This commit is contained in:
A.Unger
2020-06-04 11:45:19 +02:00
parent c7310ae232
commit c61bbd7783
6 changed files with 179 additions and 13 deletions
+30
View File
@@ -0,0 +1,30 @@
package runtime
import (
"github.com/micro/cli/v2"
"github.com/owncloud/ocis-pkg/v2/log"
)
// Options is a runtime option
type Options struct {
Services []string
Logger log.Logger
Context *cli.Context
}
// Option undocummented
type Option func(o *Options)
// Services option
func Services(s []string) Option {
return func(o *Options) {
o.Services = append(o.Services, s...)
}
}
// Context option
func Context(c *cli.Context) Option {
return func(o *Options) {
o.Context = c
}
}