add:partial functionality

This commit is contained in:
2026-04-06 02:38:37 +09:00
parent da82f233bc
commit 9c7f1149ba
10 changed files with 444 additions and 47 deletions

View File

@@ -1,5 +1,7 @@
package services
import "fmt"
type ServicesStore struct {
Config *ConfigService
}
@@ -11,3 +13,11 @@ func NewServicesStore() (*ServicesStore, error) {
}
return &ServicesStore{Config: cfg}, nil
}
func (s *ServicesStore) NewStorageService(serverName string) (*StorageService, error) {
srv, ok := s.Config.servers[serverName]
if !ok {
return nil, fmt.Errorf("server %q not found", serverName)
}
return NewStorageService(srv), nil
}