Change interface and reintroduce caching

This commit is contained in:
Jan Eitzinger
2022-09-13 07:37:48 +02:00
parent 95f04f8ae9
commit fd100f28dd
4 changed files with 38 additions and 33 deletions

View File

@@ -8,11 +8,9 @@ import (
"errors"
"fmt"
"github.com/ClusterCockpit/cc-backend/pkg/lrucache"
"github.com/ClusterCockpit/cc-backend/pkg/schema"
)
var cache *lrucache.Cache = lrucache.New(1024)
var Clusters []*schema.Cluster
var nodeLists map[string]map[string]NodeList
@@ -51,7 +49,7 @@ func initClusterConfig() error {
}
}
Clusters = append(Clusters, &cluster)
Clusters = append(Clusters, cluster)
nodeLists[cluster.Name] = make(map[string]NodeList)
for _, sc := range cluster.SubClusters {