Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Refresh() to be called more than once #593

Open
rdimitrov opened this issue Jan 31, 2024 · 0 comments
Open

Enable Refresh() to be called more than once #593

rdimitrov opened this issue Jan 31, 2024 · 0 comments

Comments

@rdimitrov
Copy link
Contributor

rdimitrov commented Jan 31, 2024

Moved from rdimitrov/go-tuf-metadata#86

Describe the bug

Currently a Refresh() can be done only once during the lifetime of an Updater.

This is not optimal for long-living processes so it would be better if we enable calling Refresh() more than once.

References:

Expected behavior

Upon calling Refresh() make sure everything is up-to-date and if that's true:

  • return nil, instead of an error (better imho)
    or
  • return a custom error type so the user can check it via errors.Is (less favourite)

If something else occurred which failed us to refresh the metadata, still return the appropriate error value.

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant