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

@ -21,7 +21,7 @@ func (resolver *Resolver) Cron(ctx context.Context) error {
// AllPrefixes returns a list of all prefixes from the server.
// Prefixes may be cached on the server
func (resolver *Resolver) AllPrefixes(ctx context.Context) (map[string]string, error) {
instances, err := resolver.Instances.All(ctx)
instances, err := resolver.Dependencies.Instances.All(ctx)
if err != nil {
return nil, err
}

View file

@ -17,8 +17,9 @@ import (
type Resolver struct {
component.Base
Instances *instances.Instances
Dependencies struct {
Instances *instances.Instances
}
prefixes lazy.Lazy[map[string]string] // cached prefixes (from the server)
RefreshInterval time.Duration