-
Notifications
You must be signed in to change notification settings - Fork 929
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
application service discovery support etcd reporter #1221
application service discovery support etcd reporter #1221
Conversation
metadata/report/etcd/report_test.go
Outdated
err = metadataReport.PublishAppMetadata(subMi, metadataInfo) | ||
assert.Nil(t, err) | ||
|
||
_, err = metadataReport.GetAppMetadata(subMi) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't check the return value of GetAppMetadata
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, It should be...
Codecov Report
@@ Coverage Diff @@
## 3.0 #1221 +/- ##
==========================================
- Coverage 59.53% 55.84% -3.69%
==========================================
Files 259 272 +13
Lines 12737 12896 +159
==========================================
- Hits 7583 7202 -381
- Misses 4199 4792 +593
+ Partials 955 902 -53
Continue to review full report at Codecov.
|
} | ||
|
||
// PublishAppMetadata publish metadata info to etcd | ||
func (e *etcdMetadataReport) PublishAppMetadata(metadataIdentifier *identifier.SubscriberMetadataIdentifier, info *common.MetadataInfo) error { | ||
// TODO will implement | ||
panic("implement me") | ||
key := e.getNodeKey(metadataIdentifier) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
key := e.getNodeKey(metadataIdentifier)
value, err := json.Marshal(info)
if err == nil {
err = e.client.Put(key, string(value))
}
return err
What this PR does:
1 application service discovery support etcd reporter
2 fix the comments of PublishAppMetadata and GetAppMetadata
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: