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

[client] Cleanup dns and route states on startup #2757

Merged
merged 18 commits into from
Oct 24, 2024
Merged

Conversation

lixmal
Copy link
Contributor

@lixmal lixmal commented Oct 18, 2024

Describe your changes

Issue ticket number and link

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

@lixmal lixmal changed the title Cleanup dns and route states on startup [client] Cleanup dns and route states on startup Oct 18, 2024

// State interface defines the methods that all state types must implement
type State interface {
Name() string
Copy link
Contributor

Choose a reason for hiding this comment

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

If accidentally implement multiple states with the same name then it can cause an issue. Maybe would be good to maintain the names in this pkg.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could add a check in RegisterState but that means we need to return an error which adds more refactoring/boilerplate. Is it worth it?

Copy link
Contributor

Choose a reason for hiding this comment

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

I am just thinking in exported const string what will be used by the implementation of the interface.

Copy link

sonarcloud bot commented Oct 23, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
3 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@lixmal lixmal merged commit 869537c into main Oct 24, 2024
21 checks passed
@lixmal lixmal deleted the cleanup-saved-state branch October 24, 2024 08:53
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