Skip to content

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

@rdimitrov

Description

@rdimitrov

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions