Skip to content

Conversation

@pipiland2612
Copy link
Contributor

@pipiland2612 pipiland2612 commented Oct 17, 2025

What Issue is this fixing ?

  • Expose backoff directory so that we could use the function func WithAPIBackoff(cfg BackoffConfig) without the error: "Use of the internal package is not allowed"

Changes

  • Create a BackoffConfig public struct that serve as a public layer to internal backoff.Config

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
@pipiland2612
Copy link
Contributor Author

Another option is to define an interface that allows passing in the WithBackoff method. However, this approach feels less clean and adds unnecessary complexity for the client, since our goal is only to modify the configuration—not the underlying implementation.

@bwplotka
Copy link
Member

Can you update title and description (and commit message)? It's out of date (description) and title is not human readable.

Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing, looks good, just readability nits!

Signed-off-by: pipiland2612 <nguyen.t.dang.minh@gmail.com>
@pipiland2612 pipiland2612 changed the title Public_backoff_config Public backoff config to allow usage of WithAPIBackoff Oct 17, 2025
@pipiland2612 pipiland2612 requested a review from bwplotka October 17, 2025 11:52
@bwplotka bwplotka merged commit ddad4f3 into prometheus:main Oct 17, 2025
8 checks passed
@pipiland2612 pipiland2612 deleted the change_backoff branch October 17, 2025 13:25
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

Successfully merging this pull request may close these issues.

2 participants