wip: feat(task): added AutoStart and AutoRestart on ServiceTask
This commit is contained in:
10
init/init.go
10
init/init.go
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
type Tasks interface {
|
||||
List() []Task
|
||||
Services() []Task
|
||||
Services() []ServiceTask
|
||||
Crones() []CronTask
|
||||
Get(string) (Task, error)
|
||||
}
|
||||
@@ -25,7 +25,7 @@ type Task interface {
|
||||
Environ() []string
|
||||
Setsid() bool
|
||||
UserGroup() UserGroup
|
||||
Background() bool
|
||||
Background() bool //NOTE: implies using wmpidproxy
|
||||
WorkingDir() string
|
||||
Status() TaskStatus
|
||||
}
|
||||
@@ -35,6 +35,12 @@ type CronTask interface {
|
||||
TimeToRun(time.Time) bool
|
||||
}
|
||||
|
||||
type ServiceTask interface {
|
||||
Task
|
||||
AutoStart() bool
|
||||
AutoRestart() bool
|
||||
}
|
||||
|
||||
type Config interface {
|
||||
Tasks() Tasks
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user