优化结构

This commit is contained in:
Yvan
2026-08-24 13:25:16 +08:00
parent 7a9a738c6a
commit 0b6b8ddf1a
72 changed files with 2475 additions and 1443 deletions
+4 -4
View File
@@ -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