优化结构
This commit is contained in:
@@ -30,12 +30,16 @@ type InitializationRepo interface {
|
||||
DiskMountPoints() []string
|
||||
}
|
||||
|
||||
type SystemConfigUsecase struct {
|
||||
repo InitializationRepo
|
||||
tasks TaskRuntime
|
||||
type TaskReloader interface {
|
||||
Reload(context.Context) error
|
||||
}
|
||||
|
||||
func NewSystemConfigUsecase(repo InitializationRepo, tasks TaskRuntime) *SystemConfigUsecase {
|
||||
type SystemConfigUsecase struct {
|
||||
repo InitializationRepo
|
||||
tasks TaskReloader
|
||||
}
|
||||
|
||||
func NewSystemConfigUsecase(repo InitializationRepo, tasks TaskReloader) *SystemConfigUsecase {
|
||||
return &SystemConfigUsecase{repo: repo, tasks: tasks}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user