ingredient/info: Add Fetcher concept

This commit is contained in:
Tom Wiesing 2022-10-19 10:50:40 +02:00
parent a6501b42c7
commit 52559e4d68
No known key found for this signature in database
22 changed files with 447 additions and 328 deletions

View file

@ -73,7 +73,7 @@ func (home *Home) homeRender() ([]byte, error) {
i := i
wissKI := instance
eg.Go(func() (err error) {
context.Instances[i], err = wissKI.Info().Fetch(true)
context.Instances[i], err = wissKI.Info().Information(true)
return
})
}

View file

@ -50,7 +50,7 @@ func (nfo *Info) indexPageAPI(r *http.Request) (idx indexPageContext, err error)
// store the info for this group!
group.Go(func() (err error) {
idx.Instances[i], err = instance.Info().Fetch(true)
idx.Instances[i], err = instance.Info().Information(true)
return err
})
}

View file

@ -40,7 +40,7 @@ func (info *Info) instancePageAPI(r *http.Request) (is instancePageContext, err
is.Instance = instance.Instance
// get some more info about the wisski
is.Info, err = instance.Info().Fetch(false)
is.Info, err = instance.Info().Information(false)
if err != nil {
return is, err
}

View file

@ -37,7 +37,7 @@ func (resolver *Resolver) AllPrefixes() (map[string]string, error) {
// failed to fetch prefixes for this particular instance
// => skip it!
prefixes, err := instance.Prefixes().PrefixesCached()
prefixes, err := instance.Prefixes().AllCached()
if err != nil {
lastErr = err
continue