pool: Reddo component-like fields
This commit is contained in:
parent
99983ee6db
commit
337a5fbeba
48 changed files with 291 additions and 163 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue