-
Notifications
You must be signed in to change notification settings - Fork 773
Supernode support seed task pr #1313
Supernode support seed task pr #1313
Conversation
471d8ba
to
ed59371
Compare
9bc80a4
to
a930c92
Compare
There are 6 commits in this pull request. Could you submit several pull requests to separate them? |
a930c92
to
a4ee207
Compare
Codecov Report
@@ Coverage Diff @@
## master #1313 +/- ##
==========================================
- Coverage 51.24% 51.23% -0.02%
==========================================
Files 124 124
Lines 8159 8165 +6
==========================================
+ Hits 4181 4183 +2
- Misses 3639 3643 +4
Partials 339 339
Continue to review full report at Codecov.
|
First PR is ready now |
@@ -1511,6 +1511,27 @@ definitions: | |||
This dfget is treated a client and carries a client ID. | |||
Thus, multiple dfget processes on the same peer have different CIDs. | |||
|
|||
HeartBeatResponse: |
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.
Where is the HeartBeatResponse
be used in swagger?
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.
API /peer/heartbeat.
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.
Yeah, I find this api, but its response definition is not HeartBeatResponse
.
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.
The definition in file api.md?
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.
If so, i'll make it complete soon.
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.
The api is defined in api/swagger.yml
, you can search /peer/heartbeat
in this file.
a4ee207
to
0398dfe
Compare
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.
please merge two commits into one
supernode/server/router.go
Outdated
@@ -48,6 +48,8 @@ func initRoute(s *Server) *mux.Router { | |||
{Method: http.MethodGet, Path: "/peer/piece/suc", HandlerFunc: s.reportPiece}, | |||
{Method: http.MethodGet, Path: "/peer/service/down", HandlerFunc: s.reportServiceDown}, | |||
{Method: http.MethodGet, Path: "/peer/piece/error", HandlerFunc: s.reportPieceError}, | |||
{Method: http.MethodPost, Path: "/peer/network", HandlerFunc: s.getP2PNetworkInfo}, |
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 is this POST method named getP2PNetworkInfo
? Is it should be GET
method?
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.
fix it
0398dfe
to
a2670f4
Compare
+ /peer/network + /peer/heartbeat Signed-off-by: henry.hj <[email protected]>
a2670f4
to
4525cb4
Compare
@lowzj Are there any more comments? |
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.
LGTM
Ⅰ. Describe what this PR did
Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews