move refs/pman over to owncloud/ocis/ocis/pkg/runtime

This commit is contained in:
A.Unger
2021-01-25 16:06:22 +01:00
parent 1404a8beaa
commit e50ee6e002
23 changed files with 994 additions and 5 deletions
+36
View File
@@ -0,0 +1,36 @@
package controller
import (
"github.com/owncloud/ocis/ocis/pkg/runtime/config"
"github.com/rs/zerolog"
)
// Options are the configurable options for a Controller.
type Options struct {
Bin string
Restart bool
Config *config.Config
Log *zerolog.Logger
}
// Option represents an option.
type Option func(o *Options)
// NewOptions returns a new Options struct.
func NewOptions() Options {
return Options{}
}
// WithConfig sets Controller config.
func WithConfig(cfg *config.Config) Option {
return func(o *Options) {
o.Config = cfg
}
}
// WithLog sets Controller config.
func WithLog(l *zerolog.Logger) Option {
return func(o *Options) {
o.Log = l
}
}