chore(updater): incorporate FetchServers method in Provider interface
- Each provider interface can now fetch updated servers data - Rename each provider updater subpackage name to `updater` - Updater constructor does not take a settings struct - Updater update method takes in a slice of provider strings
This commit is contained in:
@@ -81,8 +81,8 @@ func (c *CLI) Update(ctx context.Context, args []string, logger UpdaterLogger) e
|
||||
return fmt.Errorf("cannot create servers storage: %w", err)
|
||||
}
|
||||
|
||||
updater := updater.New(options, httpClient, storage, logger)
|
||||
err = updater.UpdateServers(ctx)
|
||||
updater := updater.New(httpClient, storage, logger)
|
||||
err = updater.UpdateServers(ctx, options.Providers)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot update server information: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user