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

Fix the API for adding decorated ServiceWithPathMappings and update… #1627

Merged
merged 7 commits into from Mar 5, 2019

Conversation

trustin
Copy link
Member

@trustin trustin commented Mar 4, 2019

… documentation

Motivation:

We recently received a good question about how to decorate a
GrpcService, which is a ServiceWithPathMappings.

I found there is not enough explanation about such a question and it is
currently not easy to specify multiple decorators for a
ServiceWithPathMappings.

Modifications:

  • Allow specifying multiple decorators when registering a
    ServiceWithPathMappings.
  • Add some sections about decorating ServiceWithPathMappings and
    GrpcService.

Result:

  • Easier to decorate a ServiceWithPathMappings such as GrpcService.
  • Better documentation.

… documentation

Motivation:

We recently received a good question about how to decorate a
`GrpcService`, which is a `ServiceWithPathMappings`.

I found there is not enough explanation about such a question and it is
currently not easy to specify multiple decorators for a
`ServiceWithPathMappings`.

Modifications:

- Allow specifying multiple decorators when registering a
  `ServiceWithPathMappings`.
- Add some sections about decorating `ServiceWithPathMappings` and
  `GrpcService`.

Result:

- Easier to decorate a `ServiceWithPathMappings` such as `GrpcService`.
- Better documentation.
@trustin
Copy link
Member Author

trustin commented Mar 4, 2019

@perlun Looking forward to your feed back on the documentation.

site/src/sphinx/server-decorator.rst Outdated Show resolved Hide resolved
site/src/sphinx/server-grpc.rst Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Mar 5, 2019

Codecov Report

Merging #1627 into master will decrease coverage by 0.43%.
The diff coverage is 91.66%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1627      +/-   ##
============================================
- Coverage     73.15%   72.71%   -0.44%     
+ Complexity     7869     7861       -8     
============================================
  Files           714      716       +2     
  Lines         31189    31331     +142     
  Branches       3825     3841      +16     
============================================
- Hits          22816    22783      -33     
- Misses         6415     6592     +177     
+ Partials       1958     1956       -2
Impacted Files Coverage Δ Complexity Δ
...orp/armeria/server/AbstractVirtualHostBuilder.java 58.82% <100%> (+1.68%) 26 <2> (+1) ⬆️
...ava/com/linecorp/armeria/server/ServerBuilder.java 73.02% <50%> (ø) 85 <0> (ø) ⬇️
.../armeria/common/stream/EventLoopStreamMessage.java 0% <0%> (-53.93%) 0% <0%> (-37%)
...rp/armeria/common/stream/StreamMessageWrapper.java 55.17% <0%> (-24.83%) 9% <0%> (ø)
...linecorp/armeria/common/HttpRequestAggregator.java 70.58% <0%> (-14.03%) 6% <0%> (+1%)
.../com/linecorp/armeria/server/grpc/GrpcService.java 89.32% <0%> (-5.75%) 29% <0%> (+6%)
...ria/common/stream/PublisherBasedStreamMessage.java 68.37% <0%> (-4.96%) 14% <0%> (+2%)
...om/linecorp/armeria/client/HttpSessionHandler.java 57.75% <0%> (-3.45%) 27% <0%> (-2%)
...p/armeria/common/stream/FilteredStreamMessage.java 75.8% <0%> (-3.44%) 13% <0%> (+2%)
...com/linecorp/armeria/internal/grpc/GrpcStatus.java 58.06% <0%> (-3.23%) 21% <0%> (-1%)
... and 23 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 4a760e1...41de1d5. Read the comment docs.

Copy link
Member

@minwoox minwoox left a comment

Choose a reason for hiding this comment

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

LGTM

site/src/sphinx/server-decorator.rst Show resolved Hide resolved
@minwoox
Copy link
Member

minwoox commented Mar 5, 2019

LGTM one more. 😄

@trustin trustin merged commit a50d6d3 into line:master Mar 5, 2019
@trustin trustin deleted the grpc_decorator branch March 5, 2019 05:47
@trustin
Copy link
Member Author

trustin commented Mar 5, 2019

Thanks for reviewing.

fmguerreiro pushed a commit to fmguerreiro/armeria that referenced this pull request Sep 19, 2020
line#1627)

Motivation:

We recently received a good question about how to decorate a
`GrpcService`, which is a `ServiceWithPathMappings`.

I found there is not enough explanation about such a question and it is
currently not easy to specify multiple decorators for a
`ServiceWithPathMappings`.

Modifications:

- Allowed specifying multiple decorators when registering a
  `ServiceWithPathMappings`.
- Added some sections about decorating `ServiceWithPathMappings` and
  `GrpcService`.
- Miscellaneous:
  - Added some missing imports.
  - Made indentation prettier in some examples.

Result:

- Easier to decorate a `ServiceWithPathMappings` such as `GrpcService`.
- Better documentation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants