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

Set Eureka InstanceInfo to endpoint attribute #6069

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Ivan-Montes
Copy link

Related: #6056

Motivation:

Users might want to use the metadata from the Eureka InstanceInfo but currently, there's no way to retrieve it.

Modifications:

  • Add a helper class to hide the implementation detail.
  • Set the InstanceInfo to the Endpoint as an attribute.

Result:

Related: line#6056

Motivation:

Users might want to use the metadata from the Eureka `InstanceInfo` but currently, there's no way to retrieve it.

Modifications:

- Add a helper class to hide the implementation detail.
- Set the `InstanceInfo` to the `Endpoint` as an attribute.

Result:

- Closes line#6056
- Now users can retrieve it.
@CLAassistant
Copy link

CLAassistant commented Jan 13, 2025

CLA assistant check
All committers have signed the CLA.

@@ -399,6 +400,24 @@ public List<Endpoint> apply(byte[] content) {
}
}

private static final class EurekaInstanceInfoUtil {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's:

  • Remove this class because users cannot access this class to retrieve InstanceInfo
  • Move com.linecorp.armeria.internal.common.eureka.InstanceInfo to com.linecorp.armeria.common.eureka.InstanceInfo
  • Move the methods to the InstanceInfo class
  • Add a test to verify that users can retrieve the InstanceInfo

Copy link
Author

Choose a reason for hiding this comment

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

Okay, thanks for the steps. I will work on it.

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.

Set Eureka InstanceInfo to endpoint attribute
3 participants