Skip to content

Commit

Permalink
documentation + version 6 release
Browse files Browse the repository at this point in the history
  • Loading branch information
jvmlet committed Sep 11, 2016
1 parent 0a44b6b commit 66557f9
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 3 deletions.
47 changes: 45 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ If you are using protobuf version lower than `3.0.0`, please use `org.lognet:grp
== Show case
In the 'grpc-spring-boot-starter-demo' project you can find fully functional example with integration test.
=== Service implementation
The service definition from `.proto` file looks like this :
[source,proto]
----
Expand All @@ -62,10 +64,51 @@ All you need to do is to annotate your service implementation with `@org.lognet.
}
----
=== Interceptors support
The starter supports the registration of two kinds of interceptors:
- Per service
[source,java]
----
@GRpcService(interceptors = { LogInterceptor.class })
public class GreeterService extends GreeterGrpc.GreeterImplBase{
// ommited
}
----
`LogInterceptor` will be instantiated via spring factory if there is bean of type `LogInterceptor`, or via no-args constructor otherwise.
- Global
[source,java]
----
@GRpcGlobalInterceptor
public class MyInterceptor implements ServerInterceptor{
// ommited
}
----
In both cases the interceptor has to implement `io.grpc.ServerInterceptor` interface.
The particular service also has the opportunity to disable the global interceptors :
[source,java]
----
@GRpcService(applyGlobalInterceptors = false)
public class GreeterService extends GreeterGrpc.GreeterImplBase{
// ommited
}
----
== On the roadmap
* Customized gRPC server builder with compression/decompression registry, custom `Executor` service and transport security.
* `ServerInterceptor` support.
* Customized gRPC server builder with compression/decompression registry .
* Custom `Executor` service.
* Transport security.
== License
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=0.0.6-SNAPSHOT
version=0.0.6
group=org.lognet
description=Spring Boot starter for Google RPC.
gitHubUrl=https\://github.com/LogNet/grpc-spring-boot-starter
Expand Down

0 comments on commit 66557f9

Please sign in to comment.