Set option and cli args to the service profile (#1259)

This commit is contained in:
Di Wu
2020-02-26 00:42:43 +08:00
committed by GitHub
parent 53c3bff819
commit 603d37b135
5 changed files with 61 additions and 21 deletions

View File

@@ -10,6 +10,24 @@ type Profile interface {
String() string
}
var (
DefaultProfile Profile = new(noop)
)
type noop struct{}
func (p *noop) Start() error {
return nil
}
func (p *noop) Stop() error {
return nil
}
func (p *noop) String() string {
return "noop"
}
type Options struct {
// Name to use for the profile
Name string