优化结构
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
"kra/internal/biz/system"
|
||||
"sync"
|
||||
|
||||
"kra/internal/conf"
|
||||
"kra/internal/config"
|
||||
)
|
||||
|
||||
type Reloadable struct {
|
||||
@@ -15,15 +15,15 @@ type Reloadable struct {
|
||||
current system.FileStorage
|
||||
}
|
||||
|
||||
func NewFileStorage(runtime *conf.Runtime) (*Reloadable, error) {
|
||||
var config *conf.AdminBackend
|
||||
func NewFileStorage(runtime *config.Store) (*Reloadable, error) {
|
||||
var config *config.Admin
|
||||
if runtime != nil {
|
||||
config = runtime.Admin()
|
||||
}
|
||||
return NewReloadable(config)
|
||||
}
|
||||
|
||||
func NewReloadable(config *conf.AdminBackend) (*Reloadable, error) {
|
||||
func NewReloadable(config *config.Admin) (*Reloadable, error) {
|
||||
current, err := New(config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user