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

Rest protocol #329

Merged
merged 27 commits into from
Feb 5, 2020
Merged

Rest protocol #329

merged 27 commits into from
Feb 5, 2020

Conversation

Patrick0308
Copy link
Contributor

What this PR does:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


go.sum Show resolved Hide resolved
protocol/rest/rest_client/resty_client.go Outdated Show resolved Hide resolved
common/extension/rest_client.go Show resolved Hide resolved
common/extension/rest_config_reader.go Show resolved Hide resolved
protocol/rest/rest_config_initializer.go Show resolved Hide resolved
protocol/rest/rest_config_reader/default_config_reader.go Outdated Show resolved Hide resolved
protocol/rest/rest_invoker_test.go Outdated Show resolved Hide resolved
protocol/rest/rest_protocol.go Show resolved Hide resolved
protocol/rest/rest_protocol.go Outdated Show resolved Hide resolved
protocol/rest/rest_protocol_test.go Outdated Show resolved Hide resolved
protocol/rest/rest_server/gin_server.go Outdated Show resolved Hide resolved
Copy link
Member

@flycash flycash left a comment

Choose a reason for hiding this comment

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

Firstly, it seems that we use the camel case rather than xxx_xxx

common/extension/rest_client.go Show resolved Hide resolved
protocol/rest/rest_client/resty_client.go Outdated Show resolved Hide resolved
protocol/rest/rest_client/resty_client.go Outdated Show resolved Hide resolved
protocol/rest/rest_client/resty_client.go Show resolved Hide resolved
protocol/rest/rest_config_reader/default_config_reader.go Outdated Show resolved Hide resolved
protocol/rest/rest_interface/rest_client.go Show resolved Hide resolved
protocol/rest/rest_server/gin_server.go Outdated Show resolved Hide resolved
@Patrick0308 Patrick0308 changed the title Rest invoker and rest's config (WIP)Rest protocol Jan 24, 2020
@codecov-io
Copy link

codecov-io commented Jan 24, 2020

Codecov Report

Merging #329 into feature/rest will increase coverage by 0.46%.
The diff coverage is 46.15%.

Impacted file tree graph

@@               Coverage Diff                @@
##           feature/rest     #329      +/-   ##
================================================
+ Coverage         66.32%   66.78%   +0.46%     
================================================
  Files               127      128       +1     
  Lines              7828     7877      +49     
================================================
+ Hits               5192     5261      +69     
+ Misses             2130     2098      -32     
- Partials            506      518      +12
Impacted Files Coverage Δ
protocol/rest/rest_protocol.go 93.65% <ø> (ø) ⬆️
protocol/rest/rest_exporter.go 100% <ø> (ø) ⬆️
...l/rest/rest_config_reader/default_config_reader.go 45.45% <100%> (ø)
protocol/rest/rest_config_initializer.go 82.5% <33.33%> (+50.55%) ⬆️
protocol/rest/rest_invoker.go 73.07% <66.66%> (+34.89%) ⬆️
cluster/cluster_impl/base_cluster_invoker.go 62.31% <0%> (-10.15%) ⬇️
cluster/cluster_impl/failback_cluster_invoker.go 78.49% <0%> (-2.16%) ⬇️
registry/etcdv3/registry.go 50.5% <0%> (-1.02%) ⬇️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9acc7aa...a957054. Read the comment docs.

@flycash flycash changed the title (WIP)Rest protocol Rest protocol Feb 2, 2020
protocol/rest/rest_client/resty_client.go Outdated Show resolved Hide resolved
protocol/rest/rest_client/resty_client.go Outdated Show resolved Hide resolved
protocol/rest/rest_client/resty_client.go Outdated Show resolved Hide resolved
logger.Infof("[Go Restful] Server exiting")
}

func getArgsFromRequest(req *restful.Request, types []reflect.Type, config *rest_interface.RestMethodConfig) []interface{} {
Copy link
Member

Choose a reason for hiding this comment

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

Could you split this method into several smaller methods?

@flycash flycash merged commit d93a2a3 into apache:feature/rest Feb 5, 2020
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.

6 participants