pool: Reddo component-like fields

This commit is contained in:
Tom Wiesing 2022-12-22 13:49:05 +01:00
parent 99983ee6db
commit 337a5fbeba
No known key found for this signature in database
48 changed files with 291 additions and 163 deletions

View file

@ -10,8 +10,9 @@ import (
// Component meta is responsible for managing metadata per WissKI Instance
type Meta struct {
component.Base
SQL *sql.SQL
Dependencies struct {
SQL *sql.SQL
}
sl sync.Mutex
sc map[string]*Storage
@ -40,7 +41,7 @@ func (meta *Meta) Storage(slug string) *Storage {
// create a new storage
meta.sc[slug] = &Storage{
Slug: slug,
sql: meta.SQL,
sql: meta.Dependencies.SQL,
}
return meta.sc[slug]
}